mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
17 lines
260 B
JavaScript
17 lines
260 B
JavaScript
class Foo {
|
|
#privateMethodA() {
|
|
const i = 40;
|
|
return i;
|
|
}
|
|
|
|
#privateMethodB() {
|
|
const i = 2;
|
|
return i;
|
|
}
|
|
|
|
publicMethod() {
|
|
return this.#privateMethodA() + this.#privateMethodB();
|
|
}
|
|
}
|
|
|
|
expect((new Foo).publicMethod()).toEqual(42); |