X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Ftest-utils.cjs;h=735d406af1a91d7bb02625bc58bebd56a1c94a6a;hb=2f2eefbb1c3b33179672067cd8728921c5ff7f51;hp=6dba586641d3b1906caee80c96f38e364b3e9497;hpb=d35e571704515a8b729d3455e4784054f07c368f;p=poolifier.git diff --git a/tests/test-utils.cjs b/tests/test-utils.cjs index 6dba5866..735d406a 100644 --- a/tests/test-utils.cjs +++ b/tests/test-utils.cjs @@ -55,18 +55,6 @@ const sleepTaskFunction = async ( }) } -const generateRandomInteger = (max = Number.MAX_SAFE_INTEGER, min = 0) => { - if (max < min || max < 0 || min < 0) { - throw new RangeError('Invalid interval') - } - max = Math.floor(max) - if (min != null && min !== 0) { - min = Math.ceil(min) - return Math.floor(Math.random() * (max - min + 1)) + min - } - return Math.floor(Math.random() * (max + 1)) -} - const jsonIntegerSerialization = n => { for (let i = 0; i < n; i++) { const o = { @@ -116,7 +104,6 @@ module.exports = { executeTaskFunction, factorial, fibonacci, - generateRandomInteger, jsonIntegerSerialization, sleep, sleepTaskFunction,