Download react-instantsearch/examples/autocomplete/src/App.test.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 682 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/autocomplete/src/App.test.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/autocomplete/src/App.test.js
-
curl -L -o App.test.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/autocomplete/src/App.test.js
682 Bytes
| import React from 'react'; | |
| import MultiIndex from './App-Multi-Index'; | |
| import Mentions from './App-Mentions'; | |
| import renderer from 'react-test-renderer'; | |
| jest.mock('antd/lib/mention', () => { | |
| return ({ placeholder, suggestions }) => | |
| `<Mention> | |
| ${placeholder} | |
| ${suggestions.join('\n')} | |
| </Mention>`; | |
| }); | |
| describe('autocomplete recipe', () => { | |
| it('MultiIndex renders without crashing', () => { | |
| const component = renderer.create(<MultiIndex />); | |
| expect(component.toJSON()).toMatchSnapshot(); | |
| }); | |
| it('Mentions renders without crashing', () => { | |
| const component = renderer.create(<Mentions />); | |
| expect(component.toJSON()).toMatchSnapshot(); | |
| }); | |
| }); | |