1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

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,17 +1,13 @@
load("test-common.js");
test("hex escapes", () => {
expect("\x55").toBe("U");
expect("X55").toBe("X55");
expect(`\x55`).toBe("U");
expect(`\X55`).toBe("X55");
});
try {
assert("\x55" === "U");
assert("X55" === "X55");
assert(`\x55` === "U");
assert(`\X55` === "X55");
assert("\u26a0" === "⚠");
assert(`\u26a0` === "⚠");
assert("\u{1f41e}" === "🐞");
assert(`\u{1f41e}` === "🐞");
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}
test("unicode escapes", () => {
expect("\u26a0").toBe("⚠");
expect(`\u26a0`).toBe("⚠");
expect("\u{1f41e}").toBe("🐞");
expect(`\u{1f41e}`).toBe("🐞");
});