我使用https://github.com/AngularClass/angular2-webpack-starter并有跟踪问题:当我在项目目录中运行时
karma start然后我得到:
摘要: 完成✔0测试
但当我跑的时候
npm test我得到:
摘要: 完成✔0测试 npm错误!测试失败了。有关更多细节,请参见上文。
如果我跑:
npm run test我得到:
SUMMARY:
✔ 0 tests completed
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/7.1.0/bin/node" "/usr/local/bin/npm" "run" "test"
npm ERR! node v7.1.0
npm ERR! npm v4.0.2
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@5.0.5 test: `karma start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@5.0.5 test script 'karma start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! karma start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Kamil/Desktop/Code/officewise/officewise_frontend/npm-debug.log知道该怎么做才能消除这个国家预防机制的错误吗?这对我来说很重要,因为我使用一些外部系统在存储库(我的节点版本v7.1.0 (lastest)、NPMVersion4.0.2 (lastest)、MacOS塞拉利昂)中运行测试和报告新提交的错误。
发布于 2018-06-04 15:14:09
默认情况下,如果没有要运行的测试,Karma将带一个错误退出。
要禁用这种行为,需要将这一行添加到Karma配置中:
failOnEmptyTestSuite: falsehttps://stackoverflow.com/questions/40656858
复制相似问题