mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 12:15:07 +00:00
test-js: Use prettier and format all files
This commit is contained in:
parent
e532888242
commit
6d58c48c2f
248 changed files with 8291 additions and 7725 deletions
|
@ -1,37 +1,37 @@
|
|||
test("hex literals", () => {
|
||||
expect(0xff).toBe(255);
|
||||
expect(0xFF).toBe(255);
|
||||
expect(0xff).toBe(255);
|
||||
expect(0xff).toBe(255);
|
||||
});
|
||||
|
||||
test("octal literals", () => {
|
||||
expect(0o10).toBe(8);
|
||||
expect(0O10).toBe(8);
|
||||
expect(0o10).toBe(8);
|
||||
expect(0o10).toBe(8);
|
||||
});
|
||||
|
||||
test("binary literals", () => {
|
||||
expect(0b10).toBe(2);
|
||||
expect(0B10).toBe(2);
|
||||
expect(0b10).toBe(2);
|
||||
expect(0b10).toBe(2);
|
||||
});
|
||||
|
||||
test("exponential literals", () => {
|
||||
expect(1e3).toBe(1000);
|
||||
expect(1e+3).toBe(1000);
|
||||
expect(1e-3).toBe(0.001);
|
||||
expect(1.e1).toBe(10);
|
||||
expect(.1e1).toBe(1);
|
||||
expect(0.1e1).toBe(1);
|
||||
expect(.1e+1).toBe(1);
|
||||
expect(0.1e+1).toBe(1);
|
||||
expect(1e3).toBe(1000);
|
||||
expect(1e3).toBe(1000);
|
||||
expect(1e-3).toBe(0.001);
|
||||
expect(1e1).toBe(10);
|
||||
expect(0.1e1).toBe(1);
|
||||
expect(0.1e1).toBe(1);
|
||||
expect(0.1e1).toBe(1);
|
||||
expect(0.1e1).toBe(1);
|
||||
});
|
||||
|
||||
test("decimal numbers", () => {
|
||||
expect(1.).toBe(1);
|
||||
expect(.1).toBe(0.1);
|
||||
expect(1).toBe(1);
|
||||
expect(0.1).toBe(0.1);
|
||||
});
|
||||
|
||||
test("accessing properties of decimal numbers", () => {
|
||||
Number.prototype.foo = "foo";
|
||||
expect(1..foo).toBe("foo");
|
||||
expect(1.1.foo).toBe("foo");
|
||||
expect(.1.foo).toBe("foo");
|
||||
Number.prototype.foo = "foo";
|
||||
expect((1).foo).toBe("foo");
|
||||
expect((1.1).foo).toBe("foo");
|
||||
expect((0.1).foo).toBe("foo");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue