Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Commit b4783b3

Browse files
authored
Merge pull request #83 from LinusU/prefer-const
Prefer const over let
2 parents e3519c9 + f2fe2dd commit b4783b3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ const path = require('path')
66
const rimraf = require('rimraf')
77
const tap = require('tap')
88

9-
let base = path.join('test', 'tmp')
9+
const base = path.join('test', 'tmp')
1010

1111
tap.beforeEach(done => mkdir(base, done))
1212
tap.afterEach(done => rimraf(base, done))
1313

1414
tap.test('should successfully create a directory tree', assert => {
1515
assert.plan(1)
1616

17-
let x = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
18-
let y = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
19-
let z = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
17+
const x = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
18+
const y = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
19+
const z = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
2020

21-
let file = path.join(base, path.join.apply(null, [x, y, z]))
21+
const file = path.join(base, path.join.apply(null, [x, y, z]))
2222

2323
return mkdirp(file).then(made => assert.equal(made, path.resolve(path.join(base, x))))
2424
})

0 commit comments

Comments
 (0)