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

This commit is contained in:
davidot 2022-11-28 12:00:09 +01:00 committed by Andreas Kling
commit 6bdf021b0c
Notes: sideshowbarker 2024-07-17 03:59:33 +09:00
2 changed files with 13 additions and 0 deletions

View file

@ -12,4 +12,8 @@ test("basic functionality", () => {
expect(Math.asin([1, 2, 3])).toBeNaN();
expect(Math.asin({})).toBeNaN();
expect(Math.asin("foo")).toBeNaN();
expect(Math.asin(NaN)).toBe(NaN);
expect(Math.asin(-0.0)).toBe(-0.0);
expect(Math.asin(1.1)).toBe(NaN);
expect(Math.asin(-1.1)).toBe(NaN);
});