Reputation: 582
I would like to have Mocha watch my source/project files and NOT the test files. how can I accomplish this? Also the test files and source/project files are in different directories. Thank you in advance!
Upvotes: 2
Views: 550
Reputation: 56
I think this tutorial can help you : https://dev.to/promyze/setup-mocha-in-watch-mode-for-tdd-in-node-js-1mah
You can just update the paths to follow, or add the --watch-ignore
options in the package.json
file.
Upvotes: 2
Reputation: 1327
mocha --watch
watches the current working directory.
If you'd like more felxibility you can use:
npm install -g watch
watch 'mocha' dir_to_watch
Upvotes: 0