Angular test runner does not detect new files

28 Views Asked by At

I've just created a new Angular application (v.16) and started unit-test runner via ng test. Problem is test runner does not detect newly added spec files.

Test runner works, finds all spec files and runs tests from them. If I change some application file or spec.ts file it rebuilds application and rerun tests.

However, if I add a completely new .spec.ts-file to application, test runner does not run tests from it. It detects if I change that file, rebuilds application, but does not execute any tests from newly added file. To see it I have to stop test runner and restart it - after that everything works fine.

It's a bit annoying restarting test runner each time new spec is added, so I wonder if anyone has experienced similar problem and knows what to do in this case.

0

There are 0 best solutions below