* fix: early return when instance is not iterable * chore: update test fixtures * fix: gaurd against arguments for old browsers
10 lines
236 B
JavaScript
10 lines
236 B
JavaScript
expect(
|
|
() => {
|
|
var [foo, bar] = undefined;
|
|
}).toThrow("Invalid attempt to destructure non-iterable instance");
|
|
|
|
expect(
|
|
() => {
|
|
var foo = [ ...undefined ];
|
|
}).toThrow("Invalid attempt to spread non-iterable instance");
|