2020-12-28 20:14:44 +03:00
|
|
|
test("basic functionality", () => {
|
|
|
|
|
expect(Math.log10).toHaveLength(1);
|
|
|
|
|
|
2020-12-29 13:44:52 +03:00
|
|
|
expect(Math.log10(2)).toBeCloseTo(0.3010299956639812);
|
|
|
|
|
expect(Math.log10(1)).toBe(0);
|
2020-12-28 20:14:44 +03:00
|
|
|
expect(Math.log10(0)).toBe(-Infinity);
|
|
|
|
|
expect(Math.log10(-2)).toBe(NaN);
|
2020-12-29 13:44:52 +03:00
|
|
|
expect(Math.log10(100000)).toBe(5);
|
2022-11-28 12:06:50 +01:00
|
|
|
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);
|
2020-12-28 20:14:44 +03:00
|
|
|
});
|