mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 06:04:59 +00:00
21 lines
364 B
JavaScript
21 lines
364 B
JavaScript
"use strict";
|
|
|
|
load("test-common.js");
|
|
|
|
try {
|
|
[true, false, "foo", 123].forEach(primitive => {
|
|
assertThrowsError(
|
|
() => {
|
|
primitive.foo = "bar";
|
|
},
|
|
{
|
|
error: TypeError,
|
|
message: "Cannot assign property foo to primitive value",
|
|
}
|
|
);
|
|
});
|
|
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|