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

Prefer const over let #83

Merged
merged 1 commit into from Nov 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/index.js
Expand Up @@ -6,19 +6,19 @@ const path = require('path')
const rimraf = require('rimraf')
const tap = require('tap')

let base = path.join('test', 'tmp')
const base = path.join('test', 'tmp')

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

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

let x = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
let y = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
let z = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
const x = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
const y = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)
const z = Math.floor(Math.random() * Math.pow(16, 4)).toString(16)

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

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