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

LibJS: Add extreme value tests for cos and sin

These sometimes produce different NaN patterns which can mess up the
value encoding.
This commit is contained in:
davidot 2022-08-10 11:57:46 +02:00 committed by Andreas Kling
parent 27abbfdf09
commit da8715a07c
4 changed files with 35 additions and 3 deletions

View file

@ -12,4 +12,6 @@ test("basic functionality", () => {
expect(Math.sin([1, 2, 3])).toBeNaN();
expect(Math.sin({})).toBeNaN();
expect(Math.sin("foo")).toBeNaN();
expect(Math.sin(Infinity)).toBeNaN();
expect(Math.sin(-Infinity)).toBeNaN();
});