We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2db86c9 commit 1a96a5cCopy full SHA for 1a96a5c
examples/snapshot/__tests__/clock.test.js
@@ -8,6 +8,11 @@ import Clock from '../Clock';
8
jest.useFakeTimers().setSystemTime(1482363367071);
9
10
it('renders correctly', () => {
11
- const tree = renderer.create(<Clock />).toJSON();
12
- expect(tree).toMatchSnapshot();
+ const testRenderer = renderer.create(<Clock />);
+
13
+ try {
14
+ expect(testRenderer.toJSON()).toMatchSnapshot();
15
+ } finally {
16
+ testRenderer.unmount();
17
+ }
18
});
0 commit comments