mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 18:32:28 -05:00
9 lines
230 B
JavaScript
9 lines
230 B
JavaScript
test("basic functionality", () => {
|
|
function Foo() {}
|
|
Foo[Symbol.hasInstance] = value => {
|
|
return value === 2;
|
|
};
|
|
|
|
expect(new Foo() instanceof Foo).toBeFalse();
|
|
expect(2 instanceof Foo).toBeTrue();
|
|
});
|