mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
23 lines
278 B
JavaScript
23 lines
278 B
JavaScript
class Foo {
|
|
#prop = "foo";
|
|
|
|
foo() {
|
|
return this.#prop;
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo {
|
|
#prop = "bar";
|
|
|
|
bar() {
|
|
return this.#prop;
|
|
}
|
|
}
|
|
|
|
const f = new Foo;
|
|
expect(f.foo()).toBe("foo");
|
|
|
|
const b = new Bar;
|
|
expect(b.foo()).toBe("foo");
|
|
expect(b.bar()).toBe("bar");
|