jjzjj

mockReturnValue

全部标签

javascript - 测试套件无法运行 TypeError : Cannot read property 'default' of undefined

我正在尝试在我的react-native项目上设置Jest,但它与bugsnag-react-native配合得不好.在我当前的测试配置中,我看到了与bugsnag的leaveBreadcrumb函数相关的错误,如下所示:FAILapp/__tests__/NetworkReducer.test.js●TestsuitefailedtorunTypeError:Cannotreadproperty'default'ofundefinedatObject.(app/__tests__/NetworkReducer.test.js:10:20)atGenerator.next()atPro