Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

90
Views
single glob pattern to target all .test/.spec files TSConfig

I would like to exclude all test files in tsconfig.js. Files that should be excluded

*.test.ts
*.test.tsx
*.test.jsx
*.test.js
*.spec.ts
*.spec.tsx
*.spec.jsx
*.spec.js

I tried this

exclude: ["**/*.+(spec|test).{ts,tsx,js,jsx}"]

and this

exclude: [
  "**/*.+(spec|test).ts",
  "**/*.+(spec|test).tsx",
  "**/*.+(spec|test).js",
  "**/*.+(spec|test).jsx"
]

But it is not working. Is it necessary that we should specify each extension separately? Like

exclude: [
  "**/*.spec.ts",
  "**/*.spec.tsx",
  "**/*.test.ts",
  "**/*.test.tsx"
  // and goes on for .js and .jsx files
]

If YES, then what is the point of using glob pattern?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!