Skip to content

Commit

Permalink
const -> let
Browse files Browse the repository at this point in the history
  • Loading branch information
myndzi committed Nov 26, 2024
1 parent ae1075d commit f90f674
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/async.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ for (let type of ['node', 'browser']) {

nanoidSuite('avoids pool pollution, infinite loop', async () => {
await nanoid(2.1)
const second = await nanoid()
const third = await nanoid()
let second = await nanoid()
let third = await nanoid()
not.equal(second, third)
})

Expand Down
4 changes: 2 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ for (let type of ['node', 'browser']) {

test(`${type} / nanoid / avoids pool pollution, infinite loop`, () => {
nanoid(2.1)
const second = nanoid()
const third = nanoid()
let second = nanoid()
let third = nanoid()
not.equal(second, third)
})

Expand Down
8 changes: 4 additions & 4 deletions test/non-secure.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ test('nanoid / has flat distribution', () => {

test('nanoid / avoids pool pollution, infinite loop', () => {
nanoid(2.1)
const second = nanoid()
const third = nanoid()
let second = nanoid()
let third = nanoid()
not.equal(second, third)
})

Expand Down Expand Up @@ -99,8 +99,8 @@ test('customAlphabet / avoids pool pollution, infinite loop', () => {
let ALPHABET = 'abcdefghijklmnopqrstuvwxyz'
let nanoid2 = customAlphabet(ALPHABET)
nanoid2(2.1)
const second = nanoid2()
const third = nanoid2()
let second = nanoid2()
let third = nanoid2()
not.equal(second, third)
})

Expand Down
4 changes: 2 additions & 2 deletions test/react-native-polyfill.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ test('works with polyfill', () => {
test('nanoid / avoids pool pollution, infinite loop', () => {
let { nanoid } = require('../index.browser')
nanoid(2.1)
const second = nanoid()
const third = nanoid()
let second = nanoid()
let third = nanoid()
not.equal(second, third)
})

Expand Down

0 comments on commit f90f674

Please sign in to comment.