mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
19 lines
292 B
JavaScript
19 lines
292 B
JavaScript
class Foo {
|
|
#foo() { }
|
|
#foo2() { }
|
|
|
|
test(other) {
|
|
return #foo in other;
|
|
}
|
|
test2(other) {
|
|
return #foo2 in other;
|
|
}
|
|
}
|
|
|
|
const cl = new Foo();
|
|
|
|
expect(cl.test({})).toBe(false);
|
|
expect(cl.test(cl)).toBe(true);
|
|
expect(cl.test2({})).toBe(false);
|
|
expect(cl.test2(cl)).toBe(true);
|