mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 16:05:08 +00:00
LibJS: Reorganize tests into subfolders
This commit is contained in:
parent
21064a1883
commit
4c48c9d69d
213 changed files with 10 additions and 2 deletions
|
@ -1,35 +0,0 @@
|
|||
load("test-common.js")
|
||||
|
||||
try {
|
||||
let str = String.raw`foo\nbar`;
|
||||
assert(str.length === 8 && str === "foo\\nbar");
|
||||
|
||||
str = String.raw`foo ${1 + 9}\nbar${"hf!"}`;
|
||||
assert(str === "foo 10\\nbarhf!");
|
||||
|
||||
str = String.raw`${10}${20}${30}`;
|
||||
assert(str === "102030");
|
||||
|
||||
str = String.raw({ raw: ["foo ", "\\nbar"] }, 10, "hf!");
|
||||
assert(str === "foo 10\\nbar");
|
||||
|
||||
str = String.raw({ raw: ["foo ", "\\nbar"] });
|
||||
assert(str === "foo \\nbar");
|
||||
|
||||
str = String.raw({ raw: [] }, 10, "hf!");
|
||||
assert(str === "");
|
||||
|
||||
str = String.raw({ raw: 1 });
|
||||
assert(str === "");
|
||||
|
||||
assertThrowsError(() => {
|
||||
String.raw({});
|
||||
}, {
|
||||
error: TypeError,
|
||||
message: "Cannot convert property 'raw' to object from undefined",
|
||||
});
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue