Skip to content

Commit

Permalink
Prefer const over let (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU authored and Ahmad Nassri committed Nov 6, 2018
1 parent ee99d30 commit a95aaf0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ const tap = require('tap')
tap.test('simple', assert => {
assert.plan(2)

let original = {
const original = {
number: 10,
string: 'foo',
boolean: true
}

let cloned = clone(original)
const cloned = clone(original)

assert.notEqual(cloned, original)
assert.same(cloned, original)
Expand All @@ -19,9 +19,9 @@ tap.test('simple', assert => {
tap.test('complex', assert => {
assert.plan(2)

let date = new Date()
const date = new Date()

let original = {
const original = {
objects: {
array: [ null, undefined, date, /deepcopy/ig ],
to: null,
Expand All @@ -33,7 +33,7 @@ tap.test('complex', assert => {
}
}

let expected = {
const expected = {
objects: {
array: [ null, null, date.toISOString(), {} ],
to: null,
Expand All @@ -45,7 +45,7 @@ tap.test('complex', assert => {
}
}

let cloned = clone(original)
const cloned = clone(original)

assert.notEqual(cloned, original)
assert.same(cloned, expected)
Expand Down

0 comments on commit a95aaf0

Please sign in to comment.