mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* add test cases * fix: memoise class binding when lowering static elements and private methods * update test fixtures * update test fixtures
20 lines
329 B
JavaScript
20 lines
329 B
JavaScript
class A {
|
|
static #self = this;
|
|
static #getA = () => this;
|
|
|
|
static extract() {
|
|
return { self: A.#self, getA: A.#getA };
|
|
}
|
|
}
|
|
|
|
const { self, getA } = A.extract();
|
|
|
|
expect(self).toBe(A);
|
|
expect(getA()).toBe(A);
|
|
|
|
const oldA = A;
|
|
A = null;
|
|
|
|
expect(oldA.extract().self).toBe(oldA);
|
|
expect(oldA.extract().getA()).toBe(oldA);
|