mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibJS: Add more test matchers
This commit is contained in:
parent
5e971c91e3
commit
fc08222f46
8 changed files with 200 additions and 46 deletions
|
@ -1,8 +1,8 @@
|
|||
describe("[[Has]] trap normal behavior", () => {
|
||||
test("forwarding when not defined in handler", () => {
|
||||
expect("foo" in new Proxy({}, { has: null })).toBe(false);
|
||||
expect("foo" in new Proxy({}, { has: undefined})).toBe(false);
|
||||
expect("foo" in new Proxy({}, {})).toBe(false);
|
||||
expect("foo" in new Proxy({}, { has: null })).toBeFalse();
|
||||
expect("foo" in new Proxy({}, { has: undefined})).toBeFalse();
|
||||
expect("foo" in new Proxy({}, {})).toBeFalse();
|
||||
});
|
||||
|
||||
test("correct arguments supplied to trap", () => {
|
||||
|
@ -30,8 +30,8 @@ describe("[[Has]] trap normal behavior", () => {
|
|||
}
|
||||
});
|
||||
|
||||
expect("foo" in p).toBe(false);
|
||||
expect("foo" in p).toBe(true);
|
||||
expect("foo" in p).toBeFalse();
|
||||
expect("foo" in p).toBeTrue();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue