Skip to content

Commit

Permalink
Consistent error codes across OSes
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanZim committed Feb 14, 2020
1 parent 29b55cb commit eac8cd9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/mkdirs/__tests__/clobber.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ describe('mkdirp / clobber', () => {
it('should clobber', done => {
fse.mkdirp(file, 0o755, err => {
assert.ok(err)
if (os.platform().indexOf('win') === 0) {
assert.strictEqual(err.code, 'EEXIST')
} else {
assert.strictEqual(err.code, 'ENOTDIR')
}
assert.strictEqual(err.code, 'ENOTDIR')
done()
})
})
Expand Down

0 comments on commit eac8cd9

Please sign in to comment.