Created
April 3, 2019 21:28
-
-
Save noximus/0cac3909e8e89a233dd5b494d767254a 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
import CommentBox from "../CommentBox"; | |
it("shows a comment box ", () => { | |
// make a div | |
const div = document.createElement("div"); | |
// shows the div we created | |
ReactDOM.render(<App />, div); | |
// Looks inside the div | |
// and check to see if the CommentBox is in there | |
// console.log(div.innerHTML); | |
// bad practice | |
// expect(div.innerHTML).toContain('Comment Box') | |
// clean up code | |
ReactDOM.unmountComponentAtNode(div); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment