mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 18:55:07 +00:00
13 lines
396 B
JavaScript
13 lines
396 B
JavaScript
|
|
test("assignment to function call", () => {
|
|
expect(() => {
|
|
function foo() {};
|
|
foo() = "foo";
|
|
}).toThrowWithMessage(ReferenceError, "Invalid left-hand side in assignment");
|
|
});
|
|
|
|
test("assignment to inline function call", () => {
|
|
expect(() => {
|
|
(function () { })() = "foo";
|
|
}).toThrowWithMessage(ReferenceError, "Invalid left-hand side in assignment");
|
|
});
|