Math.max.js 309 B

12345678910
  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(NaN)).toBeNaN();
  8. expect(Math.max("String", 1)).toBeNaN();
  9. });