mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
19 lines
274 B
JavaScript
19 lines
274 B
JavaScript
class X {
|
|
#privateMethod() {
|
|
return 1;
|
|
}
|
|
#privateMethod2() {
|
|
return 2;
|
|
}
|
|
method1() {
|
|
return this.#privateMethod();
|
|
}
|
|
method2() {
|
|
return this.#privateMethod2();
|
|
}
|
|
}
|
|
|
|
const x = new X();
|
|
expect(x.method1()).toBe(1);
|
|
expect(x.method2()).toBe(2);
|