new-await-parens.js (635B)
1 // |reftest| module async 2 // Copyright (C) 2020 Rick Waldron. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: prod-AwaitExpression 7 description: > 8 `new (await Constructor)` returns instance of Constructor 9 flags: [module, async] 10 features: [top-level-await] 11 ---*/ 12 13 assert.sameValue((new (await Number)).valueOf(), 0); 14 assert.sameValue((new (await String)).valueOf(), ''); 15 assert.sameValue((new (await Boolean)).valueOf(), false); 16 assert.sameValue((new (await Array)).length, 0); 17 assert.sameValue((new (await Map)).size, 0); 18 assert.sameValue((new (await Set)).size, 0); 19 20 $DONE();