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

product.test.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* eslint no-shadow: 0 */
const test = require("tap").test;const ss = require("../");
test("product", function (t) { t.test("can get the product of one number", function (t) { t.equal(ss.product([2]), 2); t.end(); });
t.test("can get the product of two numbers", function (t) { t.equal(ss.product([2, 3]), 6); t.end(); });
t.test("can get the product of a negative number", function (t) { t.equal(ss.product([-1, 2, 3, 4]), -24); t.end(); });
t.test( "the product of no numbers is one - the multiplicative identity", function (t) { t.equal(ss.product([]), 1); t.end(); } ); t.end();});
simplestatistic

Version Info

Tagged at
2 years ago