mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
LibJS: Indent tests with 4 spaces instead of 2
This commit is contained in:
parent
15de2eda2b
commit
1ef573eb30
261 changed files with 8536 additions and 8497 deletions
|
@ -1,34 +1,34 @@
|
|||
test("throw literal", () => {
|
||||
try {
|
||||
throw 1;
|
||||
expect().fail();
|
||||
} catch (e) {
|
||||
if (e.name === "ExpectationError") throw e;
|
||||
expect(e).toBe(1);
|
||||
}
|
||||
try {
|
||||
throw 1;
|
||||
expect().fail();
|
||||
} catch (e) {
|
||||
if (e.name === "ExpectationError") throw e;
|
||||
expect(e).toBe(1);
|
||||
}
|
||||
});
|
||||
|
||||
test("throw array", () => {
|
||||
try {
|
||||
throw [99];
|
||||
expect().fail();
|
||||
} catch (e) {
|
||||
if (e.name === "ExpectationError") throw e;
|
||||
expect(e).toEqual([99]);
|
||||
}
|
||||
try {
|
||||
throw [99];
|
||||
expect().fail();
|
||||
} catch (e) {
|
||||
if (e.name === "ExpectationError") throw e;
|
||||
expect(e).toEqual([99]);
|
||||
}
|
||||
});
|
||||
|
||||
test("call function that throws", () => {
|
||||
function foo() {
|
||||
throw "hello";
|
||||
expect().fail();
|
||||
}
|
||||
function foo() {
|
||||
throw "hello";
|
||||
expect().fail();
|
||||
}
|
||||
|
||||
try {
|
||||
foo();
|
||||
expect().fail();
|
||||
} catch (e) {
|
||||
if (e.name === "ExpectationError") throw e;
|
||||
expect(e).toBe("hello");
|
||||
}
|
||||
try {
|
||||
foo();
|
||||
expect().fail();
|
||||
} catch (e) {
|
||||
if (e.name === "ExpectationError") throw e;
|
||||
expect(e).toBe("hello");
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue