Skip to content

Instantly share code, notes, and snippets.

@dupski
Last active July 12, 2018 09:47
Show Gist options
  • Save dupski/4ac9347e0e15c99f918d0c99ed209f96 to your computer and use it in GitHub Desktop.
Save dupski/4ac9347e0e15c99f918d0c99ed209f96 to your computer and use it in GitHub Desktop.
import * as TestRenderer from 'react-test-renderer';
let renderer: TestRenderer.ReactTestRenderer;
let instance: TestRenderer.ReactTestInstance;
beforeAll(() => {
renderer = TestRenderer.create(
<div>
<h2>My Super-sweet Component</h2>
<SomeComponent />
</div>
);
instance = renderer.root;
});
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment