mocha, I only install it in the project:
npm install mocha
Now I’m under windows
cmdCommand line tools to run it:
It can’t be done.
Does it have to be installed globally
npm install -g mochaTo run its command line tools?
I know it can be done through
npm run xx.
If you develop under window, it is recommended to install git first. After installation, you will have a linux-like environment-Gitbash’s shell:
There is no problem with the operation.
In fact, as long as we understand that npm install -g xx not only installs xx module into the global environment, but also injects the command /.bin/ carried by xx module into the global environment, so that you can use mocha xxx in the shell