Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Set / prototype / difference / not-a-constructor.js
blobeb8765cfb2be295f9aa78a1850890a8e30f22729
1 // |reftest| skip -- set-methods is not supported
2 // Copyright (C) 2023 Anthony Frehner and Kevin Gibbons. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 esid: sec-set.prototype.difference
6 description: Set.prototype.difference does not implement [[Construct]], is not new-able
7 includes: [isConstructor.js]
8 features: [Reflect.construct, set-methods]
9 ---*/
11 assert.sameValue(
12   isConstructor(Set.prototype.difference),
13   false,
14   "isConstructor(Set.prototype.difference) must return false"
17 assert.throws(
18   TypeError,
19   () => {
20     new Set.prototype.difference();
21   },
22   "`new Set.prototype.difference()` throws TypeError"
25 reportCompare(0, 0);