-
Hi, i am trying to mock sentry using jest. i have tried below. please let know what i need to do for mocking a constructor which is assigned to integrations. import {Sentry} from '../../../mocks/sentry'; mocks/sentry.ts export {Sentry};jest.mock('@sentry/browser', () => ({ describe('Sentry should be initialised', () => { Expected - sentry should be called successfully in the tsx file where its initialised. below is the sentry initialisation Sentry.init({ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
thank you. was able to resolve using jest.spyOn(Sentry, 'init'). |
Beta Was this translation helpful? Give feedback.
thank you. was able to resolve using jest.spyOn(Sentry, 'init').