From e5cc0e302d4fa1903dd58fa648f582256a98811b Mon Sep 17 00:00:00 2001 From: Joke Book Date: Thu, 7 May 2020 16:28:50 +0100 Subject: [PATCH] Use correct denominator in randIntWithout test --- test/unit/util_math.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/util_math.js b/test/unit/util_math.js index 013261b0d..d29f7c47a 100644 --- a/test/unit/util_math.js +++ b/test/unit/util_math.js @@ -58,10 +58,10 @@ test('inclusiveRandIntWithout', t => { return result; }; - t.strictEqual(withRandomValue(3 / 5, 0, 6, 2), 4); - t.strictEqual(withRandomValue(2 / 5, 0, 6, 2), 3); - t.strictEqual(withRandomValue(1 / 5, 0, 6, 2), 1); - t.strictEqual(withRandomValue(1.9 / 5, 0, 6, 2), 1); + t.strictEqual(withRandomValue(3 / 6, 0, 6, 2), 4); + t.strictEqual(withRandomValue(2 / 6, 0, 6, 2), 3); + t.strictEqual(withRandomValue(1 / 6, 0, 6, 2), 1); + t.strictEqual(withRandomValue(1.9 / 6, 0, 6, 2), 1); t.strictEqual(withRandomValue(3 / 4, 10, 14, 10), 13); t.strictEqual(withRandomValue(0 / 4, 10, 14, 10), 11);