mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
LibJS: Convert remaining top-level tests to new system
This commit is contained in:
parent
6d58c48c2f
commit
918f4affd5
19 changed files with 518 additions and 497 deletions
|
@ -1,21 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
load("test-common.js");
|
||||
|
||||
try {
|
||||
test("basic functionality", () => {
|
||||
[true, false, "foo", 123].forEach(primitive => {
|
||||
assertThrowsError(
|
||||
() => {
|
||||
primitive.foo = "bar";
|
||||
},
|
||||
{
|
||||
error: TypeError,
|
||||
message: "Cannot assign property foo to primitive value",
|
||||
}
|
||||
);
|
||||
expect(() => {
|
||||
primitive.foo = "bar";
|
||||
}).toThrowWithMessage(TypeError, "Cannot assign property foo to primitive value");
|
||||
});
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue