diff options
Diffstat (limited to 'js/src/tests/test262/language/module-code/top-level-await/new-await.js')
-rw-r--r-- | js/src/tests/test262/language/module-code/top-level-await/new-await.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/module-code/top-level-await/new-await.js b/js/src/tests/test262/language/module-code/top-level-await/new-await.js new file mode 100644 index 0000000000..88adab1446 --- /dev/null +++ b/js/src/tests/test262/language/module-code/top-level-await/new-await.js @@ -0,0 +1,18 @@ +// |reftest| shell-option(--enable-top-level-await) skip-if(!xulRuntime.shell) error:SyntaxError module -- requires shell-options +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-AwaitExpression +description: > + await cannot immediately follow new in module code +negative: + phase: parse + type: SyntaxError +flags: [module] +features: [top-level-await] +---*/ + +$DONOTEVALUATE(); + +new await; |