1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +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,32 +1,32 @@
test("constructor properties", () => {
expect(Boolean).toHaveLength(1);
expect(Boolean.name).toBe("Boolean");
expect(Boolean).toHaveLength(1);
expect(Boolean.name).toBe("Boolean");
});
test("typeof", () => {
expect(typeof new Boolean()).toBe("object");
expect(typeof Boolean()).toBe("boolean");
expect(typeof Boolean(true)).toBe("boolean");
expect(typeof new Boolean()).toBe("object");
expect(typeof Boolean()).toBe("boolean");
expect(typeof Boolean(true)).toBe("boolean");
});
test("basic functionality", () => {
var foo = new Boolean(true);
var bar = new Boolean(true);
var foo = new Boolean(true);
var bar = new Boolean(true);
expect(foo).not.toBe(bar);
expect(foo.valueOf()).toBe(bar.valueOf());
expect(foo).not.toBe(bar);
expect(foo.valueOf()).toBe(bar.valueOf());
expect(Boolean()).toBeFalse();
expect(Boolean(false)).toBeFalse();
expect(Boolean(null)).toBeFalse();
expect(Boolean(undefined)).toBeFalse();
expect(Boolean(NaN)).toBeFalse();
expect(Boolean("")).toBeFalse();
expect(Boolean(0.0)).toBeFalse();
expect(Boolean(-0.0)).toBeFalse();
expect(Boolean(true)).toBeTrue();
expect(Boolean("0")).toBeTrue();
expect(Boolean({})).toBeTrue();
expect(Boolean([])).toBeTrue();
expect(Boolean(1)).toBeTrue();
expect(Boolean()).toBeFalse();
expect(Boolean(false)).toBeFalse();
expect(Boolean(null)).toBeFalse();
expect(Boolean(undefined)).toBeFalse();
expect(Boolean(NaN)).toBeFalse();
expect(Boolean("")).toBeFalse();
expect(Boolean(0.0)).toBeFalse();
expect(Boolean(-0.0)).toBeFalse();
expect(Boolean(true)).toBeTrue();
expect(Boolean("0")).toBeTrue();
expect(Boolean({})).toBeTrue();
expect(Boolean([])).toBeTrue();
expect(Boolean(1)).toBeTrue();
});

View file

@ -1,5 +1,5 @@
test("basic functionality", () => {
expect(typeof Boolean.prototype).toBe("object");
expect(Boolean.prototype.valueOf()).toBeFalse();
expect(Boolean.prototype).not.toHaveProperty("length");
expect(typeof Boolean.prototype).toBe("object");
expect(Boolean.prototype.valueOf()).toBeFalse();
expect(Boolean.prototype).not.toHaveProperty("length");
});

View file

@ -1,17 +1,17 @@
test("basic functionality", () => {
var foo = true;
expect(foo.toString()).toBe("true");
expect(true.toString()).toBe("true");
var foo = true;
expect(foo.toString()).toBe("true");
expect(true.toString()).toBe("true");
expect(Boolean.prototype.toString.call(true)).toBe("true");
expect(Boolean.prototype.toString.call(false)).toBe("false");
expect(Boolean.prototype.toString.call(true)).toBe("true");
expect(Boolean.prototype.toString.call(false)).toBe("false");
expect(new Boolean(true).toString()).toBe("true");
expect(new Boolean(false).toString()).toBe("false");
expect(new Boolean(true).toString()).toBe("true");
expect(new Boolean(false).toString()).toBe("false");
});
test("errors on non-boolean |this|", () => {
expect(() => {
Boolean.prototype.toString.call("foo");
}).toThrowWithMessage(TypeError, "Not a Boolean object");
expect(() => {
Boolean.prototype.toString.call("foo");
}).toThrowWithMessage(TypeError, "Not a Boolean object");
});

View file

@ -1,16 +1,16 @@
test("basic functionality", () => {
var foo = true;
expect(foo.valueOf()).toBeTrue();
expect(true.valueOf()).toBeTrue();
var foo = true;
expect(foo.valueOf()).toBeTrue();
expect(true.valueOf()).toBeTrue();
expect(Boolean.prototype.valueOf.call(true)).toBeTrue();
expect(Boolean.prototype.valueOf.call(false)).toBeFalse();
expect(Boolean.prototype.valueOf.call(true)).toBeTrue();
expect(Boolean.prototype.valueOf.call(false)).toBeFalse();
expect(new Boolean().valueOf()).toBeFalse();
expect(new Boolean().valueOf()).toBeFalse();
});
test("errors on non-boolean |this|", () => {
expect(() => {
Boolean.prototype.valueOf.call("foo");
}).toThrowWithMessage(TypeError, "Not a Boolean object");
expect(() => {
Boolean.prototype.valueOf.call("foo");
}).toThrowWithMessage(TypeError, "Not a Boolean object");
});