angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Ng test misses files

Open b-johnse opened this issue 9 years ago • 4 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

1.4.1

Repro steps.

Not changing any configs or other dependencies, migrated from 1.3.2 up to 1.4.1. As a result an entire directory of code along with app.component.spec.ts were no longer included when running ng test. Reverted back to 1.3.2 and all tests ran again. It would seem something changed in the .spec.ts file detection? The app is large/private so I cannot provide a link or plunkr.

The log given by the failure.

No failures, but only 97 tests were ran/detected when there should have been 483.

Desired functionality.

detection of .spec.ts files back

Mention any other details that might be useful.

b-johnse avatar Sep 15 '17 19:09 b-johnse

I don't think we changed anything in the test setup itself, but maybe it was something in the TS plugin. Can you provide me with a repro of some spec files being missed? Or a hint as to which ones are missed? I can't see any spec files being randomly missed in my setups so I'm guessing there's something those have in common.

filipesilva avatar Sep 26 '17 08:09 filipesilva

So after doing a side-by-side comparison of a fresh app generated by the 1.4.5 cli... the difference is in the tsconfig.json files.

I had to go revisit the contents of tsconfig.json and tsconfig.spec.json in order for all my .spec files to get picked up again when i ran ng test.

b-johnse avatar Oct 12 '17 20:10 b-johnse

Seems like it's sorted then 👍

filipesilva avatar Oct 20 '17 10:10 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.