Added a test for the new bin utilities module.
This commit is contained in:
parent
aa8c43044a
commit
1277968f31
14
tests/testBins.js
Normal file
14
tests/testBins.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
|
import { expect } from "chai";
|
||||||
|
import { describe } from "mocha";
|
||||||
|
import { createUniAvgSel } from "../src/support/bins.js";
|
||||||
|
|
||||||
|
describe("Bin utilities", function () {
|
||||||
|
describe("the function that generates a uniform average of the array values", function () {
|
||||||
|
it("returns 2 given [1, 2, 3]", function () {
|
||||||
|
const unifAvgFunc = createUniAvgSel();
|
||||||
|
const avg = unifAvgFunc([1, 2, 3]);
|
||||||
|
expect(avg).to.equal(2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user