LibJS: Convert remaining top-level tests to new system

This commit is contained in:
Matthew Olsson
2020-07-05 10:47:40 -07:00
committed by Andreas Kling
parent 6d58c48c2f
commit 918f4affd5
19 changed files with 518 additions and 497 deletions

View File

@@ -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);
});