Skip to content

Instantly share code, notes, and snippets.

@SebinLee
Created May 28, 2020 08:03
Show Gist options
  • Save SebinLee/248250030107d7396ac3a2eee5c201ae to your computer and use it in GitHub Desktop.
Save SebinLee/248250030107d7396ac3a2eee5c201ae to your computer and use it in GitHub Desktop.
React Testing Recipe 번역 - Multiple Renderers
import { act as domAct } from "react-dom/test-utils";
import { act as testAct, create } from "react-test-renderer";
// ...
let root;
domAct(() => {
testAct(() => {
root = create(<App />);
});
});
expect(root).toMatchSnapshot();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment