import "mocha"; import { expect } from "chai"; import { is } from "../helpers"; describe('Thunk factory "is.lengthRange"', () => { it("recognizes length range", () => { const valid = [ [17,42], [42,17], [42,Infinity] ]; const invalid = [ [17,.42], [42,-17], [42,NaN] ]; const thunk = is.lengthRange(); for (const range of valid) expect(thunk(range)).to.be.true; for (const range of invalid) expect(thunk(range)).to.be.false; }); });