mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
14 lines
202 B
JavaScript
14 lines
202 B
JavaScript
let counter = 0;
|
|
class Foo {
|
|
constructor() {
|
|
this.#privateFieldValue = ++counter;
|
|
}
|
|
|
|
get #privateFieldValue() {
|
|
return 42;
|
|
}
|
|
}
|
|
|
|
expect(() => new Foo).toThrow();
|
|
expect(counter).toBe(1);
|