ladybird/Libraries/LibJS/Tests/parser-invalid-destructuring-assignment-target.js

5 lines
183 B
JavaScript

test("Assigning to an invalid destructuring assignment target should fail immediately", () => {
expect(() => {
eval("[[function=a{1,}=");
}).toThrow(SyntaxError);
});