Skip to content

Commit

Permalink
refactor(benchmark): replace var statements (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Oct 24, 2024
1 parent 04cedc1 commit 38b8c1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchmark/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const suite = new benchmark.Suite()
suite.add({
name: 'create',
minSamples: 100,
fn: 'var token = tokens.create(secret)'
fn: 'const token = tokens.create(secret)'
})

suite.on('start', function onCycle (event) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/secret.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const suite = new benchmark.Suite()
suite.add({
name: 'secretSync',
minSamples: 100,
fn: 'var secret = tokens.secretSync()'
fn: 'const secret = tokens.secretSync()'
})

suite.add({
Expand Down
4 changes: 2 additions & 2 deletions benchmark/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ suite.add({
name: 'verify - valid',
minSamples: 100,
setup: 'token = tokens.create(secret)',
fn: 'var valid = tokens.verify(secret, token)'
fn: 'const valid = tokens.verify(secret, token)'
})

suite.add({
name: 'verify - invalid',
minSamples: 100,
setup: 'token = tokens.create(secret).replace(/[a-zA-Z]/g, "=")',
fn: 'var valid = tokens.verify(secret, token)'
fn: 'const valid = tokens.verify(secret, token)'
})

suite.on('start', function onCycle (event) {
Expand Down

0 comments on commit 38b8c1b

Please sign in to comment.