2020-07-04 14:09:48 -03:00
|
|
|
test("basic functionality", () => {
|
2020-07-06 11:37:45 -03:00
|
|
|
expect(Math.max).toHaveLength(2);
|
2020-04-13 14:31:13 -03:00
|
|
|
|
2020-07-06 11:37:45 -03:00
|
|
|
expect(Math.max()).toBe(-Infinity);
|
|
|
|
|
expect(Math.max(1)).toBe(1);
|
|
|
|
|
expect(Math.max(2, 1)).toBe(2);
|
|
|
|
|
expect(Math.max(1, 2, 3)).toBe(3);
|
2021-04-23 15:47:53 -03:00
|
|
|
expect(Math.max(-0, 0)).toBe(0);
|
|
|
|
|
expect(Math.max(0, -0)).toBe(0);
|
2020-07-06 11:37:45 -03:00
|
|
|
expect(Math.max(NaN)).toBeNaN();
|
|
|
|
|
expect(Math.max("String", 1)).toBeNaN();
|
2020-07-04 14:09:48 -03:00
|
|
|
});
|