mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
LibJS: Add spec comments and check for edge cases in Math.log
This commit is contained in:
parent
d4e5644df8
commit
4813385c9a
2 changed files with 23 additions and 3 deletions
|
@ -5,4 +5,7 @@ test("basic functionality", () => {
|
|||
expect(Math.log(0)).toBe(-Infinity);
|
||||
expect(Math.log(1)).toBe(0);
|
||||
expect(Math.log(10)).toBeCloseTo(2.302585092994046);
|
||||
expect(Math.log(NaN)).toBe(NaN);
|
||||
expect(Math.log(Number.POSITIVE_INFINITY)).toBe(Number.POSITIVE_INFINITY);
|
||||
expect(Math.log(-0.0)).toBe(Number.NEGATIVE_INFINITY);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue