mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +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,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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue