Download react-instantsearch/examples/react-router-v3/src/App.test.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 486 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/react-router-v3/src/App.test.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/react-router-v3/src/App.test.js
-
curl -L -o App.test.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/react-router-v3/src/App.test.js
486 Bytes
| import React from 'react'; | |
| import App from './App'; | |
| import { Router, Route, browserHistory } from 'react-router'; | |
| import renderer from 'react-test-renderer'; | |
| describe('react-router recipe', () => { | |
| it('App renders without crashing', () => { | |
| const RoutedApp = ( | |
| <Router history={browserHistory}> | |
| <Route path="/" component={App} /> | |
| </Router> | |
| ); | |
| const component = renderer.create(RoutedApp); | |
| expect(component.toJSON()).toMatchSnapshot(); | |
| }); | |
| }); | |