Math.max.js 383 B

123456789101112
  1. test("basic functionality", () => {
  2. expect(Math.max).toHaveLength(2);
  3. expect(Math.max()).toBe(-Infinity);
  4. expect(Math.max(1)).toBe(1);
  5. expect(Math.max(2, 1)).toBe(2);
  6. expect(Math.max(1, 2, 3)).toBe(3);
  7. expect(Math.max(-0, 0)).toBe(0);
  8. expect(Math.max(0, -0)).toBe(0);
  9. expect(Math.max(NaN)).toBeNaN();
  10. expect(Math.max("String", 1)).toBeNaN();
  11. });