deno.land / x / simplestatistic@v7.7.1 / test / sign.test.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* eslint no-shadow: 0 */
const test = require("tap").test;const sign = require("../").sign;
test("bisect", function (t) { t.test("can find sign of number", function (t) { t.equal(sign(2), 1); t.equal(sign(0), 0); t.equal(sign(-0), 0); t.equal(sign(-2), -1); t.equal(sign(-0.000001), -1); t.equal(sign(0.000001), 1); t.throws(function () { sign("hello world!"); }, "Throws with syntax error x is not a number"); t.end(); }); t.end();});
simplestatistic

Version Info

Tagged at
2 years ago