Use walkdir instead of findit, which supports Windows.

This commit is contained in:
Cheng Zhao 2013-07-22 16:41:52 +08:00
parent 008b8d404d
commit 7ad8c3b569
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
"coffee-script": "1.6.2", "coffee-script": "1.6.2",
"mocha": "*", "mocha": "*",
"findit": "*", "walkdir": "*",
"unzip": "*" "unzip": "*"
}, },

View file

@ -20,14 +20,14 @@
if (query.invert) mocha.invert(); if (query.invert) mocha.invert();
// Read all test files. // Read all test files.
var finder = require('findit').find(__dirname); var walker = require('walkdir').walk(__dirname);
finder.on('file', function(file) { walker.on('file', function(file) {
if (/.coffee$/.test(file)) if (/.coffee$/.test(file))
mocha.addFile(file); mocha.addFile(file);
}); });
finder.on('end', function() { walker.on('end', function() {
mocha.run(function() { mocha.run(function() {
Mocha.utils.highlightTags('code'); Mocha.utils.highlightTags('code');
}); });