Created
March 27, 2019 07:34
-
-
Save DinAlla/3d68b9ea2c07f130f49d4be4705286ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe(ExampleComponent testing', () => { | |
test('should render correctly', () => { | |
const wrapper = shallow( | |
<ExampleComponent /> | |
); | |
expect(shallowToJson(wrapper)).toMatchSnapshot(); | |
window.history.pushState( | |
{}, | |
'', | |
'/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