1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibJS: Indent tests with 4 spaces instead of 2

This commit is contained in:
Matthew Olsson 2020-07-06 07:37:45 -07:00 committed by Andreas Kling
parent 15de2eda2b
commit 1ef573eb30
261 changed files with 8536 additions and 8497 deletions

View file

@ -1,31 +1,31 @@
test("basic functionality", () => {
expect(String.raw).toHaveLength(1);
expect(String.raw).toHaveLength(1);
let str = String.raw`foo\nbar`;
expect(str).toHaveLength(8);
expect(str).toBe("foo\\nbar");
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`foo ${1 + 9}\nbar${"hf!"}`;
expect(str).toBe("foo 10\\nbarhf!");
str = String.raw`${10}${20}${30}`;
expect(str).toBe("102030");
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"] }, 10, "hf!");
expect(str).toBe("foo 10\\nbar");
str = String.raw({ raw: ["foo ", "\\nbar"] });
expect(str).toBe("foo \\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: [] }, 10, "hf!");
expect(str).toBe("");
str = String.raw({ raw: 1 });
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");
expect(() => {
String.raw({});
}).toThrowWithMessage(TypeError, "Cannot convert property 'raw' to object from undefined");
});