当我尝试在我的react-native代码上运行Jest快照测试时,我收到以下错误
我应该为接力创建模拟吗?是否有任何代码示例模拟Relay使用jest和react-native?
Error: Cannot find module 'react-dom' from 'relayUnstableBatchedUpdates.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:151:17)
at Object.<anonymous> (node_modules/react-relay/lib/relayUnstableBatchedUpdates.js:15:18)
at new RelayEnvironment (node_modules/react-relay/lib/RelayEnvironment.js:39:63)