Skip to content

Commit

Permalink
Update to work with promiseless nodejs.
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Feb 21, 2010
1 parent 1b1637b commit 955efad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (module.id === ".") {
next();
}}

fs.readdir(__dirname).addCallback(function (files) { (function T (f) {
fs.readdir(__dirname, function (error, files) {(function T (f) {
var file = files[f];
if (!file) {
if (!failures) return sys.puts("ok");
Expand All @@ -57,9 +57,9 @@ if (module.id === ".") {
// run this test.
function next () { T(f + 1) };
if (/\.js$/.exec(file)) {
require.async(__dirname + "/"+file.replace(/\.js$/, ''))
.addCallback(next)
.addErrback(fail(file, next));
require.async(__dirname + "/"+file.replace(/\.js$/, ''), function (er) {
return (er) ? fail(file, next) : next()
});
}
})(0)});
}

0 comments on commit 955efad

Please sign in to comment.