Download next.js/test/production/jest/rsc/app/client-component.test.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 304 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/jest/rsc/app/client-component.test.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/production/jest/rsc/app/client-component.test.jsx
-
curl -L -o client-component.test.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/jest/rsc/app/client-component.test.jsx
304 Bytes
| /** | |
| * @jest-environment jsdom | |
| */ | |
| import { render, screen } from '@testing-library/react' | |
| import '@testing-library/jest-dom' | |
| import Component from './client-component' | |
| it('works with client-only code', () => { | |
| render(<Component />) | |
| expect(screen.getByRole('heading')).toHaveTextContent('Hello') | |
| }) | |