Skip to content

Commit

Permalink
Update: arrow functions simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
JPeer264 committed Feb 22, 2017
1 parent 4182655 commit d24a98b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 1 addition & 3 deletions lib/copy/__tests__/copy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ describe('fs-extra', () => {
fse.emptyDir(TEST_DIR, done)
})

afterEach(done => {
fse.remove(TEST_DIR, done)
})
afterEach(done => fse.remove(TEST_DIR, done))

describe('+ copy()', () => {
it('should return an error if src and dest are the same', done => {
Expand Down
5 changes: 1 addition & 4 deletions lib/json/__tests__/output-json-sync.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ describe('json', () => {
const file = path.join(TEST_DIR, 'this-dir', 'does-not', 'exist', 'really', 'file.json')
assert(!fs.existsSync(file))

const replacer = (k, v) => {
if (v === 'JP') return 'Jon Paul'
return v
}
const replacer = (k, v) => v === 'JP' ? 'Jon Paul' : v
const data = {name: 'JP'}

outputJsonSync(file, data, { replacer })
Expand Down
5 changes: 1 addition & 4 deletions lib/json/__tests__/output-json.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ describe('json', () => {
const file = path.join(TEST_DIR, 'this-dir', 'does-not', 'exist', 'really', 'file.json')
assert(!fs.existsSync(file))

const replacer = (k, v) => {
if (v === 'JP') return 'Jon Paul'
return v
}
const replacer = (k, v) => v === 'JP' ? 'Jon Paul' : v
const data = {name: 'JP'}

outputJson(file, data, { replacer }, err => {
Expand Down

0 comments on commit d24a98b

Please sign in to comment.