Download github_code/freeCodeCamp__freeCodeCamp/client/vitest-setup.js from Corpus-NZ/High-Quality-Code: direct link, hf CLI and curl.
- Browser
- Download file 381 Bytes
-
https://huggingface.co/datasets/Corpus-NZ/High-Quality-Code/resolve/refs%2Fpr%2F4/github_code/freeCodeCamp__freeCodeCamp/client/vitest-setup.js
- Command line
-
hf download hf://datasets/Corpus-NZ/High-Quality-Code@refs/pr/4/github_code/freeCodeCamp__freeCodeCamp/client/vitest-setup.js
-
curl -L -o vitest-setup.js https://huggingface.co/datasets/Corpus-NZ/High-Quality-Code/resolve/refs%2Fpr%2F4/github_code/freeCodeCamp__freeCodeCamp/client/vitest-setup.js
381 Bytes
| import { vi, afterEach } from 'vitest'; | |
| import '@testing-library/jest-dom/vitest'; | |
| import { cleanup } from '@testing-library/react'; | |
| vi.mock('react-spinkit'); | |
| vi.mock('gatsby'); | |
| vi.mock('react-i18next'); | |
| afterEach(() => { | |
| // Vitest doesn't automatically call cleanup. Without it the rendered | |
| // components are never removed and so tests are not independent. | |
| cleanup(); | |
| }); | |