I am trying to follow this tutorial Testing in Node.js and used the following command for installing mocha
sudo npm install -g mocha
Got the following response:
npm WARN deprecated [email protected]: Renamed to supports-color. If you're using chalk, upgrade to the latest version. https://github.com/chalk/supports-color
/usr/local/bin/mocha -> /usr/local/lib/node_modules/mocha/bin/mocha
/usr/local/bin/_mocha -> /usr/local/lib/node_modules/mocha/bin/_mocha
[email protected] /usr/local/lib/node_modules/mocha
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected])
But running mocha
in my project directory doesn't generate any response:
lingxiao@computer:~/dir/to/proj$ find *
lib
lib/tags.js
node_modules
node_modules/chai
node_modules/chai/CONTRIBUTING.md
...
node_modules/chai/index.js
test
test/tagsSpec.js
lingxiao@computer:~/dir/to/proj$ mocha
lingxiao@computer:~/dir/to/proj$ which mocha
/usr/local/bin/mocha
Anyone knows what the problem is?