Skip to content

Commit

Permalink
Fix jest environment in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yousif-bugsnag committed Feb 7, 2024
1 parent ad100d1 commit a7995ab
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/expo/test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
* @jest-environment jsdom
*/

const delivery = require('@bugsnag/delivery-expo')

Expand Down Expand Up @@ -90,6 +87,14 @@ jest.doMock('../../../node_modules/expo-device', () => ({
modelName: 'Pixel 4'
}))

const networkBreadcrumbsPlugin = {
load: () => () => {}
}

jest.mock('../../../node_modules/@bugsnag/plugin-network-breadcrumbs', () => {
return () => networkBreadcrumbsPlugin
})

global.ErrorUtils = {
setGlobalHandler: jest.fn(),
getGlobalHandler: jest.fn()
Expand Down

0 comments on commit a7995ab

Please sign in to comment.