summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Set/prototype/union/not-a-constructor.js
blob: f57bcb02f89373c0df2d398fe84ddfe38e6de67b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// |reftest| skip -- set-methods is not supported
// Copyright (C) 2023 Anthony Frehner. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-set.prototype.union
description: Set.prototype.union does not implement [[Construct]], is not new-able
includes: [isConstructor.js]
features: [Reflect.construct, set-methods]
---*/

assert.sameValue(
  isConstructor(Set.prototype.union),
  false,
  "isConstructor(Set.prototype.union) must return false"
);

assert.throws(
  TypeError,
  () => {
    new Set.prototype.union();
  });

reportCompare(0, 0);