-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#209) created a test for mkdirp() bad path
- Loading branch information
1 parent
1b73ffe
commit 7e1cb66
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var assert = require('assert') | ||
var fse = require(process.cwd()) | ||
|
||
/* global describe, it */ | ||
|
||
describe('mkdirp: issue-209, win32, when bad path, should return a cleaner error', function () { | ||
// only seems to be an issue on Windows. | ||
if (process.platform !== 'win32') return | ||
|
||
it('should return a cleaner error than inifinite loop, stack crash', function (done) { | ||
var file = './bad?dir' | ||
fse.mkdirp(file, function (err) { | ||
assert.strictEqual(err.code, 'ENOENT') | ||
done() | ||
}) | ||
}) | ||
}) |