From c54d4c487c84c4aa26ae280282775d3370195f8c Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Thu, 7 Apr 2022 22:47:46 +1000 Subject: [PATCH] obey note in randomrange.js for tests --- helpers/randomrange.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/randomrange.test.js b/helpers/randomrange.test.js index 3a14acc1..48a9ff6d 100644 --- a/helpers/randomrange.test.js +++ b/helpers/randomrange.test.js @@ -13,8 +13,8 @@ describe('randomRange() - return number with secure crypto', () => { for(let i in cases) { test(`randomRange should output ${cases[i].in.min}<=out<=${cases[i].in.max} for an input of ${cases[i].in.min}, ${cases[i].in.max}`, async () => { const output = await randomRange(cases[i].in.min, cases[i].in.max); - expect(output).toBeGreaterThanOrEqual(cases[i].in.min); - expect(output).toBeLessThanOrEqual(cases[i].in.max); + expect(output).toBeGreaterThanOrEqual(Math.floor(cases[i].in.min)); + expect(output).toBeLessThanOrEqual(Math.floor(cases[i].in.max)); }); }