| 1 |
class Foo { |
| 2 |
#client |
| 3 |
|
| 4 |
constructor(props) { |
| 5 |
let x; |
| 6 |
;({ x, ...this.#client } = props) |
| 7 |
} |
| 8 |
|
| 9 |
getClient() { |
| 10 |
return this.#client; |
| 11 |
} |
| 12 |
} |
| 13 |
|
| 14 |
const foo = new Foo({ x: 'foo', y: 'bar', z: 'baz' }); |
| 15 |
expect(foo.getClient()).toEqual({ y: 'bar', z: 'baz' }); |