In CRA 2.1 and later versions, you should be able to use TypeScript for your test files without any special jest config at all. Just be sure that your __tests__ folder is nested underneath your src folder, or that your test files are inside your src folder and have any of the following extensions:

  • .test.js
  • .test.ts
  • .test.jsx
  • .test.tsx
  • .spec.js
  • .spec.ts
  • .spec.jsx
  • .spec.tsx

Related Query

More Query from same tag