mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibJS: Convert some top-level tests to the new system
First test conversions! These look really good :)
This commit is contained in:
committed by
Andreas Kling
parent
4b8a3e6d78
commit
eea6041302
@@ -1,14 +1,8 @@
|
||||
load("test-common.js");
|
||||
|
||||
try {
|
||||
test("basic update expression", () => {
|
||||
var o = {};
|
||||
o.f = 1;
|
||||
|
||||
assert(o.f++ === 1);
|
||||
assert(++o.f === 3);
|
||||
assert(isNaN(++o.missing));
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
expect(o.f++).toBe(1);
|
||||
expect(++o.f).toBe(3);
|
||||
expect(++o.missing).toBeNaN();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user