Download web/src/test/setup.ts from EnergyVenom/patch-testing-coworker: direct link, hf CLI and curl.
- Browser
- Download file 581 Bytes
-
https://huggingface.co/spaces/EnergyVenom/patch-testing-coworker/resolve/main/web/src/test/setup.ts
- Command line
-
hf download hf://spaces/EnergyVenom/patch-testing-coworker/web/src/test/setup.ts
-
curl -L -o setup.ts https://huggingface.co/spaces/EnergyVenom/patch-testing-coworker/resolve/main/web/src/test/setup.ts
581 Bytes
| import '@testing-library/jest-dom/vitest'; | |
| // jsdom lacks these browser APIs that Mantine touches. | |
| Object.defineProperty(window, 'matchMedia', { | |
| writable: true, | |
| value: (query: string) => ({ matches: false, media: query, onchange: null, addListener: () => {}, removeListener: () => {}, addEventListener: () => {}, removeEventListener: () => {}, dispatchEvent: () => false }), | |
| }); | |
| class RO { observe() {} unobserve() {} disconnect() {} } | |
| (window as unknown as { ResizeObserver: typeof RO }).ResizeObserver = RO; | |
| window.HTMLElement.prototype.scrollIntoView = () => {}; | |