mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +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,50 +1,50 @@
|
|||
test("booleans", () => {
|
||||
expect(true || true).toBeTrue();
|
||||
expect(false || false).toBeFalse();
|
||||
expect(true || false).toBeTrue();
|
||||
expect(false || true).toBeTrue();
|
||||
expect(true || true).toBeTrue();
|
||||
expect(false || false).toBeFalse();
|
||||
expect(true || false).toBeTrue();
|
||||
expect(false || true).toBeTrue();
|
||||
});
|
||||
|
||||
test("strings", () => {
|
||||
expect("" || "").toBe("");
|
||||
expect("" || false).toBeFalse();
|
||||
expect("" || true).toBeTrue();
|
||||
expect(false || "").toBe("");
|
||||
expect(true || "").toBeTrue();
|
||||
expect("foo" || "bar").toBe("foo");
|
||||
expect("foo" || false).toBe("foo");
|
||||
expect("foo" || true).toBe("foo");
|
||||
expect(false || "bar").toBe("bar");
|
||||
expect(true || "bar").toBeTrue();
|
||||
expect("" || "").toBe("");
|
||||
expect("" || false).toBeFalse();
|
||||
expect("" || true).toBeTrue();
|
||||
expect(false || "").toBe("");
|
||||
expect(true || "").toBeTrue();
|
||||
expect("foo" || "bar").toBe("foo");
|
||||
expect("foo" || false).toBe("foo");
|
||||
expect("foo" || true).toBe("foo");
|
||||
expect(false || "bar").toBe("bar");
|
||||
expect(true || "bar").toBeTrue();
|
||||
});
|
||||
|
||||
test("numbers", () => {
|
||||
expect(false || 1 === 2).toBeFalse();
|
||||
expect(true || 1 === 2).toBeTrue();
|
||||
expect(0 || false).toBeFalse();
|
||||
expect(0 || true).toBeTrue();
|
||||
expect(42 || false).toBe(42);
|
||||
expect(42 || true).toBe(42);
|
||||
expect(false || 0).toBe(0);
|
||||
expect(true || 0).toBeTrue();
|
||||
expect(false || 42).toBe(42);
|
||||
expect(true || 42).toBeTrue();
|
||||
expect(false || 1 === 2).toBeFalse();
|
||||
expect(true || 1 === 2).toBeTrue();
|
||||
expect(0 || false).toBeFalse();
|
||||
expect(0 || true).toBeTrue();
|
||||
expect(42 || false).toBe(42);
|
||||
expect(42 || true).toBe(42);
|
||||
expect(false || 0).toBe(0);
|
||||
expect(true || 0).toBeTrue();
|
||||
expect(false || 42).toBe(42);
|
||||
expect(true || 42).toBeTrue();
|
||||
});
|
||||
|
||||
test("objects", () => {
|
||||
expect([] || false).toHaveLength(0);
|
||||
expect([] || true).toHaveLength(0);
|
||||
expect(false || []).toHaveLength(0);
|
||||
expect(true || []).toBeTrue();
|
||||
expect([] || false).toHaveLength(0);
|
||||
expect([] || true).toHaveLength(0);
|
||||
expect(false || []).toHaveLength(0);
|
||||
expect(true || []).toBeTrue();
|
||||
});
|
||||
|
||||
test("null & undefined", () => {
|
||||
expect(null || false).toBeFalse();
|
||||
expect(null || true).toBeTrue();
|
||||
expect(false || null).toBeNull();
|
||||
expect(true || null).toBeTrue();
|
||||
expect(undefined || false).toBeFalse();
|
||||
expect(undefined || true).toBeTrue();
|
||||
expect(false || undefined).toBeUndefined();
|
||||
expect(true || undefined).toBeTrue();
|
||||
expect(null || false).toBeFalse();
|
||||
expect(null || true).toBeTrue();
|
||||
expect(false || null).toBeNull();
|
||||
expect(true || null).toBeTrue();
|
||||
expect(undefined || false).toBeFalse();
|
||||
expect(undefined || true).toBeTrue();
|
||||
expect(false || undefined).toBeUndefined();
|
||||
expect(true || undefined).toBeTrue();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue