projen / projen

Rapidly build modern applications with advanced configuration management
https://projen.io
Apache License 2.0
2.53k stars 362 forks source link

bug(typescript): By default, TypeScriptProject (and derivatives) compile and publish test files in `src` #3635

Open dkershner6 opened 2 weeks ago

dkershner6 commented 2 weeks ago

We should help library authors by excluding supported testing patterns in typescript's tsconfig for publishing.

Default test match (each of these in the src or test folders):

"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[tj]s?(x)",

tsconfig (publishing one) exclude:

["node_modules"]

So any tests in the src folder are being released/published by default, though they match and run correctly.