`react-scripts test`返回码总是为零

有没有人知道如何在yarn test失败时在react应用程序中返回非零代码的yarn test (或npm test

在我的项目中,执行CI=true yarn test返回

 Test Suites: 10 failed, 10 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 1.736s Ran all test suites. Done in 2.34s. 

所有testing失败。 但是这个命令返回了零码。

这使得travis-ci无法检测到失败的testing