mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 16:13:21 +00:00
19 lines
371 B
JavaScript
19 lines
371 B
JavaScript
![]() |
"use strict";
|
||
|
|
||
|
load("test-common.js")
|
||
|
|
||
|
try {
|
||
|
[true, false, "foo", 123].forEach(primitive => {
|
||
|
assertThrowsError(() => {
|
||
|
primitive.foo = "bar";
|
||
|
}, {
|
||
|
error: TypeError,
|
||
|
message: "Can't assign property foo to primitive value"
|
||
|
});
|
||
|
});
|
||
|
|
||
|
console.log("PASS");
|
||
|
} catch (e) {
|
||
|
console.log("FAIL: " + e);
|
||
|
}
|