我喜欢以下内容:
"scripts": { "test": "npm run test-node && npm run test-browser", "test-node": "mocha -R spec ./test/node/index.js", "test-browser": "mocha-phantomjs ./test/browser/index.html"}
在
&&只运行第二,如果第一关,你可以分开,如果你想运行。请注意,npm始终使用相对的mocha(在node_modules内部),而不是全局的,因此直接调用
mocha和
mocha-phantomjs直接调用都没有害处。使用mocha的
-b保释金选项可以提高效率,一旦遇到错误,保释金就会退出。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)