Closed theorlovsky closed 2 years ago
any updates?
can you confirm this still happens in nx latest? I've not been able to reproduce this locally?
also what type of lib? this doesn't happen with angular/workspace/js/react libs from my testing
@barbados-clemens yes, I can reproduce it on v14.5.2:
npx create-nx-workspace --name jest-bug --appName jest-bug --preset=angular --nxCloud false --style scss
cd jest-bug
cat apps/jest-bug/tsconfig.app.json
ā no jest.config.ts
in exclude
npx nx g @nrwl/angular:library test
cat libs/test/tsconfig.lib.json
ā no jest.config.ts
in exclude
as wellah it looks like for ng projects it wasn't getting excluded. but is included in the .spec.json. Fixing it now. should have a PR up here soon. Odd it doesn't error out. Thanks for reporting š
Actually, could you send me the project's tsconfig, curious why it didn't get updated in the v14 migration as it should have excluded it for you.
it is excluded in the existing projects, it was done by one of the migrations. but new projects keep creating without it being excluded
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
If you migrate to the Nx version where
jest.config.ts
was introduced, the migration will add those files to theexclude
array intsconfig.lib.json
. However, when you generate a new lib after that, it gets generated withoutjest.config.ts
being excluded fromtsconfig.lib.json
.Expected Behavior
I expect some consistency here.
jest.config.ts
should either be excluded fromtsconfig.lib.json
or not, but not both.Steps to Reproduce
jest
as a unit test runnerFailure Logs
--
Environment