DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 968,873 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Rudolf Olah
Rudolf Olah

Posted on • Updated on

Angular Karma Tests Running Twice (or More Times)

Just ran into this issue where Karma test runner looked like it was running multiple times.

It turns out that the Angular CLI command for running tests, ng test will run all projects defined rather than just the default project from angular.json.

This causes some weirdness when you have file-watching turned on.

If you have 2 projects, the 1st project's tests will run and then will re-compile on any files changed. The 2nd project's tests will not run until you press Ctrl+C and then you will see them run.

There's an answer to this problem on StackOverflow:

Top comments (0)

Update Your DEV Experience Level:


Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. 🛠