1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

LibJS: Add more test matchers

This commit is contained in:
Matthew Olsson 2020-07-03 23:13:06 -07:00 committed by Andreas Kling
parent 5e971c91e3
commit fc08222f46
8 changed files with 200 additions and 46 deletions

View file

@ -1,8 +1,8 @@
describe("[[IsExtensible]] trap normal behavior", () => {
test("forwarding when not defined in handler", () => {
expect(Object.isExtensible(new Proxy({}, { isExtensible: null }))).toBe(true);
expect(Object.isExtensible(new Proxy({}, { isExtensible: undefined }))).toBe(true);
expect(Object.isExtensible(new Proxy({}, {}))).toBe(true);
expect(Object.isExtensible(new Proxy({}, { isExtensible: null }))).toBeTrue();
expect(Object.isExtensible(new Proxy({}, { isExtensible: undefined }))).toBeTrue();
expect(Object.isExtensible(new Proxy({}, {}))).toBeTrue();
});
test("correct arguments supplied to trap", () => {
@ -14,7 +14,7 @@ describe("[[IsExtensible]] trap normal behavior", () => {
}
});
expect(Object.isExtensible(p)).toBe(true);
expect(Object.isExtensible(p)).toBeTrue();
});
});