mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:47:34 +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,20 +1,14 @@
|
|||
load("test-common.js");
|
||||
|
||||
try {
|
||||
var o = {};
|
||||
test("basic functionality", () => {
|
||||
const o = {};
|
||||
o.a = 1;
|
||||
|
||||
assert(o.a === 1);
|
||||
assert(!o.a === false);
|
||||
assert(!o.a === !o.a);
|
||||
assert(~o.a === ~o.a);
|
||||
assert(+o.a === +o.a);
|
||||
assert(-o.a === -o.a);
|
||||
expect(o.a === 1).toBeTrue();
|
||||
expect(!o.a === false).toBeTrue();
|
||||
expect(!o.a === !o.a).toBeTrue();
|
||||
expect(~o.a === ~o.a).toBeTrue();
|
||||
expect(+o.a === +o.a).toBeTrue();
|
||||
expect(-o.a === -o.a).toBeTrue();
|
||||
|
||||
assert((typeof "x" === "string") === true);
|
||||
assert(!(typeof "x" === "string") === false);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
expect((typeof "x" === "string") === true).toBeTrue();
|
||||
expect(!(typeof "x" === "string") === false).toBeTrue();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue