Updating tests for SentryBoundary
This commit is contained in:
parent
d8ceec1c07
commit
2d754227b1
@ -31,9 +31,11 @@ describe('SentryBoundary', () => {
|
|||||||
// set the state manually
|
// set the state manually
|
||||||
component.setState(SentryBoundary.getDerivedStateFromError(error));
|
component.setState(SentryBoundary.getDerivedStateFromError(error));
|
||||||
|
|
||||||
expect(Sentry.captureException).toHaveBeenCalledWith(
|
const scope = { setExtra: jest.fn() };
|
||||||
error,
|
expect(Sentry.withScope).toHaveBeenCalled();
|
||||||
expect.anything());
|
|
||||||
|
Sentry.withScope.mock.calls[0][0](scope);
|
||||||
|
expect(Sentry.captureException).toHaveBeenCalledWith(error);
|
||||||
expect(component).toMatchSnapshot();
|
expect(component).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user