Reactjs 将Jest runner与使用create react app创建的react app集成

Reactjs 将Jest runner与使用create react app创建的react app集成,reactjs,jestjs,flowtype,Reactjs,Jestjs,Flowtype,我正在尝试与创建的应用程序集成,因为我希望在运行测试用例的同时运行流类型检查 我遵循中给出的步骤,并添加:- { "jest": { "runner": "jest-runner-flowtype" } } 在我的package.json中,但收到以下消息:- Out of the box, Create React App only supports overriding these Jest options: • collectCoverageFrom • co

我正在尝试与创建的应用程序集成,因为我希望在运行测试用例的同时运行流类型检查

我遵循中给出的步骤,并添加:-

{
  "jest": {
     "runner": "jest-runner-flowtype"
   }
}
在我的
package.json
中,但收到以下消息:-

Out of the box, Create React App only supports overriding these Jest 
options:

 • collectCoverageFrom
 • coverageReporters
 • coverageThreshold
 • snapshotSerializers.

 These options in your package.json Jest configuration are not currently supported by Create React App:

 • runner

 If you wish to override other Jest options, you need to eject from the default setup. You can do so by running npm run eject but remember that this is a one-way operation. You may also file an issue with Create React App to discuss supporting more options out of the box.
有没有一种方法可以将
jest流运行程序
测试运行程序
与jest同时使用

我继续阅读,但找不到添加一个跑步者的方法

更新:

我尝试从
create react app
弹出并添加了项目选项:-

 "projects": [
    {
      "displayName": "flow",
      "runner": "jest-runner-flowtype",
      "testMatch": ["<rootDir>/**/*.js"]
    }
  ]
“项目”:[
{
“displayName”:“flow”,
“runner”:“jest runner flowtype”,
“testMatch”:[“/***/*.js”]
}
]

并尝试运行
纱线jest--env=jsdom
仍然没有显示流类型错误。

我按照jest平台视频中给出的步骤进行操作,但create react应用程序不允许为jest添加跑步者设置。-你到底做了什么,“不允许”是什么意思?用户无需观看整个视频即可理解您的案例。@estus感谢您的指点,更新了信息。如果您希望覆盖其他Jest选项,则需要从默认设置中弹出-就是这样。@estus也尝试过,但在运行
纱线流
发出警告时仍然没有流错误。