Created
May 28, 2020 08:03
-
-
Save SebinLee/248250030107d7396ac3a2eee5c201ae to your computer and use it in GitHub Desktop.
React Testing Recipe 번역 - Multiple Renderers
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
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