1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

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

This commit is contained in:
davidot 2022-11-28 12:06:50 +01:00 committed by Andreas Kling
parent eda90b54d4
commit 4306462a95
2 changed files with 23 additions and 3 deletions

View file

@ -6,4 +6,7 @@ test("basic functionality", () => {
expect(Math.log10(0)).toBe(-Infinity);
expect(Math.log10(-2)).toBe(NaN);
expect(Math.log10(100000)).toBe(5);
expect(Math.log10(NaN)).toBe(NaN);
expect(Math.log10(Number.POSITIVE_INFINITY)).toBe(Number.POSITIVE_INFINITY);
expect(Math.log10(-0.0)).toBe(Number.NEGATIVE_INFINITY);
});