Everywhere: Hoist the Libraries folder to the top-level

This commit is contained in:
Timothy Flynn 2024-11-09 12:25:08 -05:00 committed by Andreas Kling
commit 93712b24bf
Notes: github-actions[bot] 2024-11-10 11:51:52 +00:00
4547 changed files with 104 additions and 113 deletions

View file

@ -0,0 +1,39 @@
test("basic functionality", () => {
expect(10 % 3).toBe(1);
expect(10.5 % 2.5).toBe(0.5);
expect(-0.99 % 0.99).toBe(-0);
// Examples from MDN:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators
expect(12 % 5).toBe(2);
expect(-1 % 2).toBe(-1);
expect(1 % -2).toBe(1);
expect(1 % 2).toBe(1);
expect(2 % 3).toBe(2);
expect(-4 % 2).toBe(-0);
expect(5.5 % 2).toBe(1.5);
expect(NaN % 2).toBeNaN();
expect(2 % NaN).toBeNaN();
expect(NaN % NaN).toBeNaN();
expect(Infinity % 1).toBeNaN();
expect(-Infinity % 1).toBeNaN();
expect(1 % Infinity).toBe(1);
expect(1 % -Infinity).toBe(1);
expect(1 % 0).toBeNaN();
expect(1 % -0).toBeNaN();
expect(0 % 5).toBe(0);
expect(-0 % 5).toBe(-0);
expect(-1 % -1).toBe(-0);
// test262 examples
expect(1 % null).toBeNaN();
expect(null % 1).toBe(0);
expect(true % null).toBeNaN();
expect(null % true).toBe(0);
expect("1" % null).toBeNaN();
expect(null % "1").toBe(0);
expect(null % undefined).toBeNaN();
expect(undefined % null).toBeNaN();
expect(undefined % undefined).toBeNaN();
expect(null % null).toBeNaN();
});