Skip to content

Commit

Permalink
Hopefully fix Windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanZim committed Feb 6, 2020
1 parent cc06967 commit 89cc8cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/mkdirs/__tests__/issue-93.test.js
Expand Up @@ -24,12 +24,12 @@ describe('mkdirp: issue-93, win32, when drive does not exist, it should return a
it('should return a cleaner error than inifinite loop, stack crash', done => {
const file = 'R:\\afasd\\afaff\\fdfd' // hopefully drive 'r' does not exist on appveyor
fse.mkdirp(file, err => {
assert.strictEqual(err.code, 'ENOENT')
assert.strictEqual(err.code, 'EPERM')

try {
fse.mkdirsSync(file)
} catch (err) {
assert.strictEqual(err.code, 'ENOENT')
assert.strictEqual(err.code, 'EPERM')
}

done()
Expand Down
4 changes: 2 additions & 2 deletions lib/mkdirs/__tests__/root.test.js
Expand Up @@ -16,9 +16,9 @@ describe('mkdirp / root', () => {

it('should', done => {
fse.mkdirp(dir, 0o755, err => {
if (err) throw err
if (err) return done(err)
fs.stat(dir, (er, stat) => {
if (er) throw er
if (er) return done(er)
assert.ok(stat.isDirectory(), 'target is a directory')
done()
})
Expand Down

0 comments on commit 89cc8cf

Please sign in to comment.