blob: 555dc89e1a953d550f08cb29f1f754a97d4cac94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// |reftest| shell-option(--enable-top-level-await) skip-if(!xulRuntime.shell) module async -- 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: >
`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();
|