我正在尝试按照本教程Testing in Node.js使用以下命令安装mocha
sudo npm install -g mocha
得到以下回复:
npm WARN deprecated has-color@0.1.7: 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
mocha@2.4.2 /usr/local/lib/node_modules/mocha
├── escape-string-regexp@1.0.2
├── supports-color@1.2.0
├── commander@2.3.0
├── diff@1.4.0
├── growl@1.8.1
├── debug@2.2.0 (ms@0.7.1)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
├── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)
└── chalk@0.4.0 (has-color@0.1.7, ansi-styles@1.0.0, strip-ansi@0.1.1)
但是在我的项目目录中运行mocha
不会产生任何响应:
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
有谁知道问题是什么?