mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +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,37 +1,37 @@
|
|||
test("regular exponentiation", () => {
|
||||
expect(2 ** 0).toBe(1);
|
||||
expect(2 ** 1).toBe(2);
|
||||
expect(2 ** 2).toBe(4);
|
||||
expect(2 ** 3).toBe(8);
|
||||
expect(3 ** 2).toBe(9);
|
||||
expect(0 ** 0).toBe(1);
|
||||
expect(2 ** (3 ** 2)).toBe(512);
|
||||
expect(2 ** (3 ** 2)).toBe(512);
|
||||
expect((2 ** 3) ** 2).toBe(64);
|
||||
expect(2 ** 0).toBe(1);
|
||||
expect(2 ** 1).toBe(2);
|
||||
expect(2 ** 2).toBe(4);
|
||||
expect(2 ** 3).toBe(8);
|
||||
expect(3 ** 2).toBe(9);
|
||||
expect(0 ** 0).toBe(1);
|
||||
expect(2 ** (3 ** 2)).toBe(512);
|
||||
expect(2 ** (3 ** 2)).toBe(512);
|
||||
expect((2 ** 3) ** 2).toBe(64);
|
||||
});
|
||||
|
||||
test("exponentation with negatives", () => {
|
||||
expect(2 ** -3).toBe(0.125);
|
||||
expect((-2) ** 3).toBe(-8);
|
||||
expect(2 ** -3).toBe(0.125);
|
||||
expect((-2) ** 3).toBe(-8);
|
||||
|
||||
// FIXME: This should fail :)
|
||||
// expect("-2 ** 3").not.toEval();
|
||||
// FIXME: This should fail :)
|
||||
// expect("-2 ** 3").not.toEval();
|
||||
});
|
||||
|
||||
test("exponentation with non-numeric primitives", () => {
|
||||
expect("2" ** "3").toBe(8);
|
||||
expect("" ** []).toBe(1);
|
||||
expect([] ** null).toBe(1);
|
||||
expect(null ** null).toBe(1);
|
||||
expect(undefined ** null).toBe(1);
|
||||
expect("2" ** "3").toBe(8);
|
||||
expect("" ** []).toBe(1);
|
||||
expect([] ** null).toBe(1);
|
||||
expect(null ** null).toBe(1);
|
||||
expect(undefined ** null).toBe(1);
|
||||
});
|
||||
|
||||
test("exponentation that produces NaN", () => {
|
||||
expect(NaN ** 2).toBeNaN();
|
||||
expect(2 ** NaN).toBeNaN();
|
||||
expect(undefined ** 2).toBeNaN();
|
||||
expect(2 ** undefined).toBeNaN();
|
||||
expect(null ** undefined).toBeNaN();
|
||||
expect(2 ** "foo").toBeNaN();
|
||||
expect("foo" ** 2).toBeNaN();
|
||||
expect(NaN ** 2).toBeNaN();
|
||||
expect(2 ** NaN).toBeNaN();
|
||||
expect(undefined ** 2).toBeNaN();
|
||||
expect(2 ** undefined).toBeNaN();
|
||||
expect(null ** undefined).toBeNaN();
|
||||
expect(2 ** "foo").toBeNaN();
|
||||
expect("foo" ** 2).toBeNaN();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue