Skip to content

Commit

Permalink
FIX: make sure the fail function gets called, so that any
Browse files Browse the repository at this point in the history
failures are detected and reported.
  • Loading branch information
laurie71 committed Feb 9, 2011
1 parent d8a6900 commit 75f7bec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/index.js
Expand Up @@ -49,7 +49,7 @@ if (module.id === ".") {
failures ++;
next();
}}

fs.readdir(__dirname, function (error, files) {(function T (f) {
var file = files[f];
if (!file) {
Expand All @@ -62,8 +62,8 @@ if (module.id === ".") {
function next () { T(f + 1) };
if (/\.js$/.exec(file)) {
require.async(__dirname + "/"+file.replace(/\.js$/, ''), function (er) {
return (er) ? fail(file, next) : next()
return (er) ? fail(file, next)(er) : next()
});
}
})(0)});
}
}

0 comments on commit 75f7bec

Please sign in to comment.