Skip to content

Commit

Permalink
never called back failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 29, 2011
1 parent 43a958e commit f618b3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/mkdirp.js
Expand Up @@ -9,6 +9,9 @@ exports.woo = function () {
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);

var file = '/tmp/' + [x,y,z].join('/');
var to = setTimeout(function () {
assert.fail('never called back');
}, 1000);

mkdirp(file, 0755, function (err) {
if (err) assert.fail(err);
Expand All @@ -17,6 +20,7 @@ exports.woo = function () {
else fs.stat(file, function (err, stat) {
if (err) assert.fail(err)
else {
clearTimeout(to);
assert.eql(stat.mode & 0777, 0755);
assert.ok(stat.isDirectory(), 'target not a directory');
}
Expand Down

0 comments on commit f618b3b

Please sign in to comment.