diff options
Diffstat (limited to 'js/src/tests/test262/language/module-code/top-level-await/new-await-parens.js')
-rw-r--r-- | js/src/tests/test262/language/module-code/top-level-await/new-await-parens.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/module-code/top-level-await/new-await-parens.js b/js/src/tests/test262/language/module-code/top-level-await/new-await-parens.js new file mode 100644 index 0000000000..db9ddf76a8 --- /dev/null +++ b/js/src/tests/test262/language/module-code/top-level-await/new-await-parens.js @@ -0,0 +1,20 @@ +// |reftest| module async +// 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: > + `new (await Constructor)` returns instance of Constructor +flags: [module, async] +features: [top-level-await] +---*/ + +assert.sameValue((new (await Number)).valueOf(), 0); +assert.sameValue((new (await String)).valueOf(), ''); +assert.sameValue((new (await Boolean)).valueOf(), false); +assert.sameValue((new (await Array)).length, 0); +assert.sameValue((new (await Map)).size, 0); +assert.sameValue((new (await Set)).size, 0); + +$DONE(); |