@testing-library/jest-dom version: 6.6.3
node version: 22.4.1
jest (or vitest) version: vitest 4.1.6
npm (or yarn) version: npm 10.8.1
Relevant code or config:
tsconfig.json
"types": ["node", "vitest/globals", "@testing-library/jest-dom"]
What you did:
When running tsc --noemit
What happened:
Reproduction:
Create a file with just the line
import "@testing-library/jest-dom";
and compile it with npx tsc --noemit [filename].
Problem description:
jest-dom references jest types in the type definitions, but I am not using jest, so I don't have these types.
Adding them gives different errors because they conflict with the vitest types.
Suggested solution:
When I remove the line in question from jest.d.ts, it compiles.
@testing-library/jest-domversion: 6.6.3nodeversion: 22.4.1jest(orvitest) version: vitest 4.1.6npm(oryarn) version: npm 10.8.1Relevant code or config:
tsconfig.json
What you did:
When running
tsc --noemitWhat happened:
Reproduction:
Create a file with just the line
and compile it with
npx tsc --noemit [filename].Problem description:
jest-dom references jest types in the type definitions, but I am not using jest, so I don't have these types.
Adding them gives different errors because they conflict with the vitest types.
Suggested solution:
When I remove the line in question from jest.d.ts, it compiles.