mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibJS: Convert most builtin tests to new system
This commit is contained in:
committed by
Andreas Kling
parent
46581773c1
commit
3f97d75778
Notes:
sideshowbarker
2024-07-19 05:04:44 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/3f97d757789 Pull-request: https://github.com/SerenityOS/serenity/pull/2689 Reviewed-by: https://github.com/linusg
@@ -1,6 +1,4 @@
|
||||
load("test-common.js");
|
||||
|
||||
try {
|
||||
test("basic functionality", () => {
|
||||
let o = {
|
||||
foo: 1,
|
||||
bar: "baz",
|
||||
@@ -26,7 +24,7 @@ try {
|
||||
}
|
||||
}`;
|
||||
|
||||
assert(string === expected);
|
||||
expect(string).toBe(expected);
|
||||
|
||||
string = JSON.stringify(o, null, "abcd");
|
||||
expected =
|
||||
@@ -43,9 +41,5 @@ abcdabcd]
|
||||
abcd}
|
||||
}`;
|
||||
|
||||
assert(string === expected);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
expect(string).toBe(expected);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user