Nicolò Ribaudo 60ef190d05
Define class elements in the correct order (#12723)
* Define class elements in the correct order

* Object.gOPDescriptors is not available on Node.js 6

* Handle numeric keys

* Update test

* Update fixtures
2021-02-02 02:22:16 +01:00

13 lines
185 B
JavaScript

class A {
get x() {}
x() {}
set x(_) {}
}
expect(Object.getOwnPropertyDescriptors(A.prototype)).toMatchObject({
x: {
get: undefined,
set: expect.any(Function),
}
});