1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 18:44:59 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins/Math/Math.max.js
2021-01-12 12:17:46 +01:00

10 lines
309 B
JavaScript

test("basic functionality", () => {
expect(Math.max).toHaveLength(2);
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);
expect(Math.max(NaN)).toBeNaN();
expect(Math.max("String", 1)).toBeNaN();
});