Files
2022-10-09 17:21:02 +02:00

15 lines
237 B
JavaScript

var _ref, _y$z;
// Array destructing
const result = (_ref = [0], (([x]) => x)(_ref));
expect(result).toBe(0);
// Object destructuring
const result2 = (_y$z = {
y: 1,
z: 2
}, (({
y,
z
}) => y + z)(_y$z));
expect(result).toBe(3);