1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibJS: Add spec comments and check for edge cases in Math.acosh

This commit is contained in:
davidot 2022-11-28 11:58:21 +01:00 committed by Andreas Kling
parent 62a3de0c0a
commit cf4daa3941
2 changed files with 19 additions and 3 deletions

View file

@ -6,4 +6,7 @@ test("basic functionality", () => {
expect(Math.acosh(0.5)).toBeNaN();
expect(Math.acosh(1)).toBeCloseTo(0);
expect(Math.acosh(2)).toBeCloseTo(1.316957);
expect(Math.acosh(NaN)).toBe(NaN);
expect(Math.acosh(Number.POSITIVE_INFINITY)).toBe(Number.POSITIVE_INFINITY);
expect(Math.acosh(1.0)).toBe(0.0);
});