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

mean_simple.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
/* eslint no-shadow: 0 */
const test = require("tap").test;const ss = require("../");
test("meanSimple", function (t) { t.test("can get the mean of two numbers", function (t) { t.equal(ss.meanSimple([1, 2]), 1.5); t.end(); }); t.test("can get the mean of one number", function (t) { t.equal(ss.meanSimple([1]), 1); t.end(); }); t.test("an empty list has no average", function (t) { t.throws(function () { ss.meanSimple([]); }); t.end(); }); t.end();});
simplestatistic

Version Info

Tagged at
2 years ago