mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:47:34 +00:00
LibJS: Add most of the Set.prototype methods
Specifically all aside from "values" and "entries" which require an implementation of the SetIterator object.
This commit is contained in:
parent
670be04c81
commit
0b0f1eda05
9 changed files with 164 additions and 0 deletions
|
@ -27,5 +27,10 @@ describe("normal behavior", () => {
|
|||
var a = new Set([0, 1, 2]);
|
||||
expect(a instanceof Set).toBeTrue();
|
||||
expect(a).toHaveSize(3);
|
||||
var seen = [false, false, false];
|
||||
a.forEach(x => {
|
||||
seen[x] = true;
|
||||
});
|
||||
expect(seen[0] && seen[1] && seen[2]);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue