mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 03:56:16 +00:00
LibJS: Implement Set.prototype.isSubsetOf
This commit is contained in:
parent
e359eeabe8
commit
e29be4eaa8
Notes:
sideshowbarker
2024-07-17 03:48:15 +09:00
Author: https://github.com/IdanHo
Commit: e29be4eaa8
Pull-request: https://github.com/SerenityOS/serenity/pull/16279
Reviewed-by: https://github.com/TobyAsE
Reviewed-by: https://github.com/davidot ✅
Reviewed-by: https://github.com/linusg ✅
4 changed files with 42 additions and 0 deletions
|
@ -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();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue