【发布时间】:2018-07-31 08:37:49
【问题描述】:
我正在尝试在 Team City 中运行我的 Jest 单元测试,但我总是得到如下所示的提示。
No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.
我尝试运行yarn test a 来运行所有测试。但是一旦测试完成执行,我仍然会得到相同的提示。我试过yarn test a q 但这不起作用。我也尝试了yarn test a --forceExit 和yarn test a --bail,但没有任何反应,我仍然得到提示。我如何在没有收到此提示的情况下运行我的所有 Jest 测试,因为在 Team City 中运行时没有交互?任何帮助将不胜感激。
【问题讨论】:
-
您是否尝试通过
--ci选项? -
@SeniorPomidor 我试过“yarn test --ci”和“yarn test a --ci”。但是它们都不起作用:(
-
哦。纱线...尝试`--silent`
-
仍然没有运气,得到相同的提示。猜猜我必须将 ci 真实的东西添加到我的包 json 中。因为那行得通。
-
哦。很高兴帮助你。正如我所说,更改 package.json 是替代解决方案
标签: reactjs jenkins teamcity jestjs yarnpkg