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

LibJS: Implement Set.prototype.isSubsetOf

This commit is contained in:
Idan Horowitz 2022-12-01 22:49:50 +02:00 committed by Linus Groh
parent e359eeabe8
commit e29be4eaa8
4 changed files with 42 additions and 0 deletions

View file

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