diff --git a/test/idGenerator.test.js b/test/idGenerator.test.js index 21f0821..afdf2a2 100644 --- a/test/idGenerator.test.js +++ b/test/idGenerator.test.js @@ -11,12 +11,13 @@ if (Buffer.isEncoding('base64url')) { t.plan(cacheSize) const ids = new Set() - for (let i = 0; i < (cacheSize); ++i) { + for (let i = 0; i < cacheSize; ++i) { const id = idGen() if (ids.has(id)) { t.assert.ifError('had a collision') } t.assert.strictEqual(id.length, 32) + ids.add(id) } }) } @@ -26,11 +27,12 @@ test('should have no collisions, base64', async (t) => { t.plan(cacheSize) const ids = new Set() - for (let i = 0; i < (cacheSize); ++i) { + for (let i = 0; i < cacheSize; ++i) { const id = idGen() if (ids.has(id)) { t.assert.ifError('had a collision') } t.assert.strictEqual(id.length, 32) + ids.add(id) } })