代码之家  ›  专栏  ›  技术社区  ›  AnOldSoul

如何在没有任何提示的情况下用纱线进行笑话测试?

  •  1
  • AnOldSoul  · 技术社区  · 7 年前

    我尝试在TeamCity中运行我的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测试,因为在团队城市中运行时没有交互?任何帮助都将不胜感激。

    3 回复  |  直到 7 年前
        1
  •  1
  •   somoso    7 年前

    Parameters

    Add a new Parameter Kind: Environment variable (env.)

    env.CI true Save

    Administration Projects

        2
  •  2
  •   Senior Pomidor    7 年前
    --ci
    

    link

    package.json

    "test": "CI=true react-scripts test --env=jsdom",
    

        3
  •  1
  •   Edan Chetrit    7 年前
    yarn test --coverage