Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / WeakSet / undefined-newtarget.js
blob1839b33d0b8c3cbeed3043c5c127c2a00171d28a
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-weakset-iterable
5 description: >
6   The WeakSet constructor is the %WeakSet% intrinsic object and the initial
7   value of the WeakSet property of the global object.
8 info: |
9   23.4.1.1 WeakSet ( [ iterable ] )
11   1. If NewTarget is undefined, throw a TypeError exception.
12 ---*/
14 assert.throws(TypeError, function() {
15   WeakSet();
16 });
18 assert.throws(TypeError, function() {
19   WeakSet([]);
20 });
22 reportCompare(0, 0);