Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit fba1e57

Browse files
committed
Add tests for undefined/null instanceof
1 parent 18b1388 commit fba1e57

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/runner-vm/test/instanceof.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ test(
5858
"Function",
5959
() => Function
6060
);
61+
test(
62+
"undefined not instanceof Object",
63+
instanceOfMacro,
64+
"Object",
65+
() => undefined,
66+
true
67+
);
68+
test("null not instanceof Object", instanceOfMacro, "Object", () => null, true);
6169

6270
test("calling defineHasInstances on same context multiple times doesn't throw", (t) => {
6371
const ctx = vm.createContext({});

0 commit comments

Comments
 (0)