mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
17 lines
232 B
JavaScript
17 lines
232 B
JavaScript
class Foo {
|
|
#bar = "foo";
|
|
|
|
test() {
|
|
return this.#bar;
|
|
}
|
|
|
|
static test(foo) {
|
|
return foo.#bar;
|
|
}
|
|
}
|
|
|
|
const f = new Foo();
|
|
expect(f.test()).toBe("foo");
|
|
expect(Foo.test(f)).toBe("foo");
|
|
expect("bar" in f).toBe(false);
|