Skip to content

Commit 402e309

Browse files
mcollinaAlexis Sellier
authored and
Alexis Sellier
committed
Fixed watch mode.
1 parent 0b54a98 commit 402e309

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/vows

+7-2
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,15 @@ if (! options.watch) {
289289
}
290290

291291
var files = (specFileExt.test(file) ? [file] : paths(testFolder)).map(function (p) {
292-
return path.join(process.cwd(), p.replace(fileExt, ''));
292+
return path.join(process.cwd(), p);
293293
}).map(function (p) {
294-
delete(require.main.moduleCache[p]);
294+
var cache = (require.main.moduleCache) ? require.main.moduleCache : require.cache;
295+
if(cache[p]) {
296+
delete(cache[p]);
297+
}
295298
return p;
299+
}).map(function (p) {
300+
return p.replace(fileExt, '');
296301
});
297302

298303
running ++;

0 commit comments

Comments
 (0)