mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibJS: Convert remaining top-level tests to new system
This commit is contained in:
committed by
Andreas Kling
parent
6d58c48c2f
commit
918f4affd5
@@ -1,19 +1,14 @@
|
||||
load("test-common.js");
|
||||
test("basic functionality", () => {
|
||||
function foo(a) {
|
||||
return a;
|
||||
}
|
||||
|
||||
function foo(a) {
|
||||
return a;
|
||||
}
|
||||
|
||||
try {
|
||||
var x = undefined;
|
||||
assert(x === undefined);
|
||||
assert(foo(x) === undefined);
|
||||
expect(x).toBeUndefined();
|
||||
expect(foo(x)).toBeUndefined();
|
||||
|
||||
var o = {};
|
||||
o.x = x;
|
||||
assert(o.x === undefined);
|
||||
assert(o.x === x);
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
expect(o.x).toBeUndefined();
|
||||
expect(o.x).toBe(x);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user