Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
describe(ExampleComponent testing', () => {
test('should render correctly', () => {
const wrapper = shallow(
<ExampleComponent />
);
expect(shallowToJson(wrapper)).toMatchSnapshot();
window.history.assign(‘/newPathname’);
const newWrapper = shallow(
<ExampleComponent />
);
expect(shallowToJson(newWrapper)).toMatchSnapshot();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.