blob: 50c4b052486c4975f8e0a9b7f545e71a2ff15e6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// |reftest| skip -- set-methods is not supported
// Copyright (C) 2023 Anthony Frehner and Kevin Gibbons. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-set.prototype.isdisjointfrom
description: Set.prototype.isDisjointFrom doesn't work with arrays
features: [set-methods]
---*/
const s1 = new Set([1, 2]);
const s2 = [3];
assert.throws(
TypeError,
function () {
s1.isDisjointFrom(s2);
},
"Throws an error when an array is used"
);
reportCompare(0, 0);
|