使用Jest模拟第三方库中的方法的问题。所以我有一个像这样实现的组件 import {foo} from 'bar' // use foo somewhere in the component
} 在测试中我试着模仿,但是一旦我将jest.mock('bar')移动到每个单独的test块中,jest就会报告一
在使用模块react-native-push-notification时,出现了以下错误: ● Test suite failedreact-native-push-notification/component/index.ios.js:10:23)const rn = require('react-native'