* Correctly transform spreads to use proper concat method * Add tests to ensure array spread clones elements
8 lines
137 B
JavaScript
8 lines
137 B
JavaScript
// test that toConsumableArray clones the array.
|
|
const arr = [];
|
|
const foo = () => arr;
|
|
|
|
const x = [...foo()];
|
|
|
|
expect(x).not.toBe(arr);
|