mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
LibJS: Convert some top-level tests to the new system
First test conversions! These look really good :)
This commit is contained in:
parent
4b8a3e6d78
commit
eea6041302
22 changed files with 464 additions and 451 deletions
|
@ -1,23 +1,14 @@
|
|||
load("test-common.js");
|
||||
|
||||
try {
|
||||
|
||||
test("let scoping", () => {
|
||||
let i = 1;
|
||||
{
|
||||
let i = 3;
|
||||
assert(i === 3);
|
||||
expect(i).toBe(3);
|
||||
}
|
||||
|
||||
assert(i === 1);
|
||||
expect(i).toBe(1);
|
||||
|
||||
{
|
||||
const i = 2;
|
||||
assert(i === 2);
|
||||
expect(i).toBe(2);
|
||||
}
|
||||
|
||||
assert(i === 1);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
expect(i).toBe(1);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue