mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
LibJS: Add Symbol.hasInstance tests
This commit is contained in:
parent
b0296735a5
commit
6075defd55
2 changed files with 17 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
|||
test("basic functionality", () => {
|
||||
expect(Function.prototype[Symbol.hasInstance]).toHaveLength(1);
|
||||
|
||||
function Foo() {}
|
||||
const foo = new Foo();
|
||||
|
||||
expect(Function.prototype[Symbol.hasInstance].call(Foo, foo)).toBeTrue();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue