1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

LibJS: Implement Set.prototype.isSupersetOf

This commit is contained in:
Idan Horowitz 2022-12-01 22:54:43 +02:00 committed by Linus Groh
parent e29be4eaa8
commit 3470f33a0f
4 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,8 @@
test("basic functionality", () => {
expect(Set.prototype.isSupersetOf).toHaveLength(1);
const set1 = new Set(["a", "b", "c"]);
const set2 = new Set(["b", "c"]);
expect(set1.isSupersetOf(set2)).toBeTrue();
expect(set2.isSupersetOf(set1)).toBeFalse();
});