Is there a way to run npm test
from a watcher in webstorm. I know I can create a run configuration from NPM but then I have to trigger it manually, but I want to run my tests on every file change.
Program: path/to/node
Arguments: path/to/npm-cli.js run-script test
Working directory: <folder where your package.json is located, $ProjectFileDir$, for example>
Not sure why you need it though... I'd suggest using existing test runners instead (karma, mocha, node-unit) - WebStorm provides good integration with them, and some of them support 'auto-testing' (rerunning on spec file change)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With