mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 19:15:07 +00:00
Libraries: Move to Userland/Libraries/
This commit is contained in:
parent
dc28c07fa5
commit
13d7c09125
1857 changed files with 266 additions and 274 deletions
|
@ -1,31 +0,0 @@
|
|||
test("basic functionality", () => {
|
||||
expect(String.raw).toHaveLength(1);
|
||||
|
||||
let str = String.raw`foo\nbar`;
|
||||
expect(str).toHaveLength(8);
|
||||
expect(str).toBe("foo\\nbar");
|
||||
|
||||
str = String.raw`foo ${1 + 9}\nbar${"hf!"}`;
|
||||
expect(str).toBe("foo 10\\nbarhf!");
|
||||
|
||||
str = String.raw`${10}${20}${30}`;
|
||||
expect(str).toBe("102030");
|
||||
|
||||
str = String.raw({ raw: ["foo ", "\\nbar"] }, 10, "hf!");
|
||||
expect(str).toBe("foo 10\\nbar");
|
||||
|
||||
str = String.raw({ raw: ["foo ", "\\nbar"] });
|
||||
expect(str).toBe("foo \\nbar");
|
||||
|
||||
str = String.raw({ raw: [] }, 10, "hf!");
|
||||
expect(str).toBe("");
|
||||
|
||||
str = String.raw({ raw: 1 });
|
||||
expect(str).toBe("");
|
||||
});
|
||||
|
||||
test("passing object with no 'raw' property", () => {
|
||||
expect(() => {
|
||||
String.raw({});
|
||||
}).toThrowWithMessage(TypeError, "Cannot convert property 'raw' to object from undefined");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue