Number-constants.js 534 B

1234567891011
  1. test("basic functionality", () => {
  2. expect(Number.EPSILON).toBe(2 ** -52);
  3. expect(Number.EPSILON).toBeGreaterThan(0);
  4. expect(Number.MAX_SAFE_INTEGER).toBe(2 ** 53 - 1);
  5. expect(Number.MAX_SAFE_INTEGER + 1).toBe(Number.MAX_SAFE_INTEGER + 2);
  6. expect(Number.MIN_SAFE_INTEGER).toBe(-(2 ** 53 - 1));
  7. expect(Number.MIN_SAFE_INTEGER - 1).toBe(Number.MIN_SAFE_INTEGER - 2);
  8. expect(Number.POSITIVE_INFINITY).toBe(Infinity);
  9. expect(Number.NEGATIVE_INFINITY).toBe(-Infinity);
  10. expect(Number.NaN).toBeNaN();
  11. });