Commit ba8461c2 authored by Jeff Avallone's avatar Jeff Avallone

More realistic faking of setState to improve coverage

parent 02f6f2d2
......@@ -29,7 +29,7 @@ describe('SentryBoundary', () => {
component.find('Child').simulateError(error);
// NOTE: Enzyme doesn't call getDerivedStateFromError yet, so we have to
// set the state manually
component.setState({ hasError: true });
component.setState(SentryBoundary.getDerivedStateFromError(error));
expect(Sentry.captureException).toHaveBeenCalledWith(
error,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment