Skip to content

Commit

Permalink
Add mocha fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderdeseyn committed Oct 31, 2020
1 parent 42c1fce commit c860e4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ task("watch", "Start the file watcher").setAction(
);
try {
await run(task.command, task.params);
// This hack is required to allow running Mocha commands. Check out https://github.com/mochajs/mocha/issues/1938 for more details.
Object.keys(require.cache).forEach(function (key) {
delete require.cache[key];
});
} catch (err) {
console.log(`Task "${task.command}" failed.`);
console.log(err);
Expand Down

0 comments on commit c860e4b

Please sign in to comment.