Created
July 10, 2019 09:26
-
-
Save radzserg/f3f10b1958321a9fa8add9ad027368cc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @withRouter() | |
| class HomePage extends PureComponent<RouteComponentProps> { | |
| render() { | |
| return ( | |
| <a onClick={this.props.history.push("/catalog")}>Catalog</a> | |
| ); | |
| } | |
| } | |
| // now I wanna make a snapshot testing | |
| it("renders home page", () => { | |
| const page = mount( | |
| {/* Not it does not reder it! without... <BrowserRouter> */} | |
| <HomePage/> | |
| ); | |
| expect(page).toMatchSnapshot(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment