<!-- I am using these setup and still no luck with having autocomplete of toBeInTheDocument or other matcher. both ide vscode and webstorm have problem the thing is that when I run the test they run and pass so it means the matcher are doing their job but the IDE is having problem recognizing the autocomplete of the commands I'm using very latest next js and vitest: vitest-setup.ts in the root of repo: import '@testing-library/jest-dom/vitest' import ResizeObserver from 'resize-observer-polyfill' import { cleanup } from '@testing-library/react' global.ResizeObserver = ResizeObserver afterEach(() => { cleanup() vi.clearAllMocks() // Clear all mock calls and instances vi.clearAllTimers() // Clear fake timers if using vi.useFakeTimers() vi.restoreAllMocks() // Restore original implementations }) window.HTMLElement.prototype.scrollIntoView = vi.fn() window.HTMLElement.prototype.hasPointerCapture = vi.fn() window.HTMLElement.prototype.releasePointerCapture = vi.fn() Object.defineProperty(window, 'matchMedia', { writable: true, value: vi.fn().mockImplementation(query => ({ matches: false, media: query, onchange: null, addListener: vi.fn(), // deprecated removeListener: vi.fn(), // deprecated addEventListener: vi.fn(), removeEventListener: vi.fn(), dispatchEvent: vi.fn() })) }) vite.config.ts: import { defineConfig } from 'vitest/config' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], test: { environment: 'jsdom', setupFiles: ['./vitestsetup.js'] } }) vitest.config.mts import { defineConfig } from 'vitest/config' import react from '@vitejs/plugin-react' import tsconfigPaths from 'vite-tsconfig-paths' export default defineConfig({ plugins: [tsconfigPaths(), react()], test: { environment: 'jsdom', globals: true, setupFiles: ['./vitest-setup.ts'], coverage: { reporter: ['text', 'json', 'html'], include: [ 'app/**/*.{ts,tsx}', 'components/**/*.{ts,tsx}', 'hooks/**/*.{ts,tsx}', 'features/**/*.{ts,tsx}', 'lib/**/*.{ts,tsx}' ], exclude: ['app/robots.ts', 'app/sitemap.ts', 'app/manifest.ts'] }, reporters: ['default', 'html'] } }) --> <img width="981" height="445" alt="Image" src="https://github.com/user-attachments/assets/6e3fd4c2-bab7-4ce6-b5a9-78c50d8de8b5" /> - `@testing-library/jest-dom` version: - `node` version: - `jest` (or `vitest`) version: - `npm` (or `yarn`) version: <!-- * `dom-testing-library` version: (if applicable) * `react-testing-library` version: (if applicable) --> ### Relevant code or config: ```js var your => (code) => here; ``` ### What you did: <!-- What you were doing --> ### What happened: <!-- Please provide the full error message/screenshots/anything --> ### Reproduction: <!-- If possible, please create a repository that reproduces the issue with the minimal amount of code possible. Or if you can, try to reproduce the issue in a Codesandbox. You can fork the one here: https://codesandbox.io/s/5z6x4r7n0p --> ### Problem description: <!-- Please describe why the current behavior is a problem --> ### Suggested solution: <!-- It's ok if you don't have a suggested solution, but it really helps if you could do a little digging to come up with some suggestion of how to improve things. -->