mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 06:34:59 +00:00
28 lines
588 B
JavaScript
28 lines
588 B
JavaScript
load("test-common.js");
|
|
|
|
try {
|
|
assertThrowsError(() => {
|
|
512 = 256;
|
|
}, {
|
|
error: ReferenceError,
|
|
message: "Invalid left-hand side in assignment"
|
|
});
|
|
|
|
assertThrowsError(() => {
|
|
512 = 256;
|
|
}, {
|
|
error: ReferenceError,
|
|
message: "Invalid left-hand side in assignment"
|
|
});
|
|
|
|
assertThrowsError(() => {
|
|
"hello world" = "another thing?";
|
|
}, {
|
|
error: ReferenceError,
|
|
message: "Invalid left-hand side in assignment"
|
|
});
|
|
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|