summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/export-declaration.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-08-23 01:43:12 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-08-23 01:43:12 +0200
commitdd33cb382321351aa3b960a6824cb9ec43bba05b (patch)
tree729b4065b2a1c849d1fb6ad28b7e0c510f1a6a67 /js/src/jit-test/tests/modules/export-declaration.js
parent6a6e4bd25d61ecf21a28ea47f2a74927553fe959 (diff)
parentab6242a93b849b0a3c7525b16bc01dd3172fc167 (diff)
downloadUXP-dd33cb382321351aa3b960a6824cb9ec43bba05b.tar
UXP-dd33cb382321351aa3b960a6824cb9ec43bba05b.tar.gz
UXP-dd33cb382321351aa3b960a6824cb9ec43bba05b.tar.lz
UXP-dd33cb382321351aa3b960a6824cb9ec43bba05b.tar.xz
UXP-dd33cb382321351aa3b960a6824cb9ec43bba05b.zip
Merge branch 'master' into Pale_Moon-release
Diffstat (limited to 'js/src/jit-test/tests/modules/export-declaration.js')
-rw-r--r--js/src/jit-test/tests/modules/export-declaration.js44
1 files changed, 42 insertions, 2 deletions
diff --git a/js/src/jit-test/tests/modules/export-declaration.js b/js/src/jit-test/tests/modules/export-declaration.js
index 3c4a9b735..9925f2c68 100644
--- a/js/src/jit-test/tests/modules/export-declaration.js
+++ b/js/src/jit-test/tests/modules/export-declaration.js
@@ -403,12 +403,52 @@ assertThrowsInstanceOf(function() {
parseAsModule("export {,} from 'a'");
}, SyntaxError);
+program([
+ exportDeclaration(
+ null,
+ [
+ exportSpecifier(
+ ident("true"),
+ ident("true")
+ ),
+ ],
+ lit("b"),
+ false
+ )
+]).assert(parseAsModule("export { true } from 'b'"));
+
+program([
+ exportDeclaration(
+ null,
+ [
+ exportSpecifier(
+ ident("true"),
+ ident("name")
+ ),
+ ],
+ lit("b"),
+ false
+ )
+]).assert(parseAsModule("export { true as name } from 'b'"));
+
+assertThrowsInstanceOf(function() {
+ parseAsModule("export { true }");
+}, SyntaxError);
+
+assertThrowsInstanceOf(function() {
+ parseAsModule("export { true as name }");
+}, SyntaxError);
+
+assertThrowsInstanceOf(function() {
+ parseAsModule("export { static }");
+}, SyntaxError);
+
assertThrowsInstanceOf(function() {
- parseAsModule("export { true as a } from 'b'");
+ parseAsModule("export { static as name }");
}, SyntaxError);
assertThrowsInstanceOf(function () {
- parseAsModule("export { a } from 'b' f();");
+ parseAsModule("export { name } from 'b' f();");
}, SyntaxError);
assertThrowsInstanceOf(function () {