mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
9 lines
258 B
JavaScript
9 lines
258 B
JavaScript
test("basic functionality", () => {
|
|
function Foo() {}
|
|
Object.defineProperty(Foo, Symbol.hasInstance, {
|
|
value: instance => instance === 2,
|
|
});
|
|
|
|
expect(new Foo() instanceof Foo).toBeFalse();
|
|
expect(2 instanceof Foo).toBeTrue();
|
|
});
|