Download react-boilerplate/app/components/Footer/tests/index.test.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 744 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-boilerplate/app/components/Footer/tests/index.test.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-boilerplate/app/components/Footer/tests/index.test.js
-
curl -L -o index.test.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-boilerplate/app/components/Footer/tests/index.test.js
744 Bytes
| import React from 'react'; | |
| import renderer from 'react-test-renderer'; | |
| import { IntlProvider } from 'react-intl'; | |
| import { Provider } from 'react-redux'; | |
| import { browserHistory } from 'react-router-dom'; | |
| import Footer from '../index'; | |
| import configureStore from '../../../configureStore'; | |
| describe('<Footer />', () => { | |
| let store; | |
| beforeAll(() => { | |
| store = configureStore({}, browserHistory); | |
| }); | |
| it('should render and match the snapshot', () => { | |
| const renderedComponent = renderer | |
| .create( | |
| <Provider store={store}> | |
| <IntlProvider locale="en"> | |
| <Footer /> | |
| </IntlProvider> | |
| </Provider>, | |
| ) | |
| .toJSON(); | |
| expect(renderedComponent).toMatchSnapshot(); | |
| }); | |
| }); | |