1 // |reftest| skip -- set-methods is not supported
2 // Copyright (C) 2023 Kevin Gibbons. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-set.prototype.symmetricdifference
6 description: Set.prototype.symmetricDifference result ordering
7 features: [set-methods]
8 includes: [compareArray.js]
11 // results are ordered as in this, then as in other
13 const s1 = new Set([1, 2, 3, 4]);
14 const s2 = new Set([6, 5, 4, 3]);
16 assert.compareArray([...s1.symmetricDifference(s2)], [1, 2, 6, 5]);
20 const s1 = new Set([6, 5, 4, 3]);
21 const s2 = new Set([1, 2, 3, 4]);
23 assert.compareArray([...s1.symmetricDifference(s2)], [6, 5, 1, 2]);