Files
ladybird/Tests/LibJS/Runtime/builtins/Math/Math.tanh.js
2026-01-22 07:46:48 -05:00

11 lines
334 B
JavaScript

test("basic functionality", () => {
expect(Math.tanh).toHaveLength(1);
expect(Math.tanh(0)).toBe(0);
expect(Math.tanh(Infinity)).toBe(1);
expect(Math.tanh(-Infinity)).toBe(-1);
expect(Math.tanh(1)).toBeCloseTo(0.7615941559557649);
expect(Math.tanh(NaN)).toBe(NaN);
expect(Math.tanh(-0.0)).toBe(-0.0);
});