diff options
Diffstat (limited to 'Libraries/LibJS/Tests/builtins/Math/Math.tanh.js')
-rw-r--r-- | Libraries/LibJS/Tests/builtins/Math/Math.tanh.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/builtins/Math/Math.tanh.js b/Libraries/LibJS/Tests/builtins/Math/Math.tanh.js new file mode 100644 index 0000000000..e24dae76c4 --- /dev/null +++ b/Libraries/LibJS/Tests/builtins/Math/Math.tanh.js @@ -0,0 +1,8 @@ +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); +}); |