Skip to content

Commit

Permalink
Fixed watch mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina authored and Alexis Sellier committed Jan 31, 2011
1 parent 0b54a98 commit 402e309
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/vows
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,15 @@ if (! options.watch) {
}

var files = (specFileExt.test(file) ? [file] : paths(testFolder)).map(function (p) {
return path.join(process.cwd(), p.replace(fileExt, ''));
return path.join(process.cwd(), p);
}).map(function (p) {
delete(require.main.moduleCache[p]);
var cache = (require.main.moduleCache) ? require.main.moduleCache : require.cache;
if(cache[p]) {
delete(cache[p]);
}
return p;
}).map(function (p) {
return p.replace(fileExt, '');
});

running ++;
Expand Down

0 comments on commit 402e309

Please sign in to comment.