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

ng test with watch=true (the default) seems to fail if code coverage flag set

Open williamBurgeson opened this issue 9 years ago • 6 comments

To update the code coverage I seem to need to set watch to false: ng test --watch=false -cc

Looking in the browser console in the testing window, seems to be failing on the cleanup of one of my components. All seems OK if not using code coverage.

Tbh not tried creating an empty project and reproducing the issue there; unfortunately can't share the code as it's commercial.

Not the end of the world obviously but would be nice to have it working so I don't have to run it separately.

williamBurgeson avatar May 16 '17 21:05 williamBurgeson

@williamBurgeson It would be nice if you can provide repo replicating the issue and also if you can add more details to the issue based on the issue template.

sumitarora avatar May 17 '17 15:05 sumitarora

@sumitarora Here are the steps

Run ng test -cc --watch true go to any watched file (spec or app) and save it

Expected - testing will rerun tests as well as run the code coverage Actual - testing reruns tests but doesn't update code-coverage

It's been like this for a while and I just checked it in 1.1.0

kenisteward avatar Jun 01 '17 19:06 kenisteward

@kenisteward I tried to replicate the issue seems to be working fine. Can you tell me which version of CLI you are using?

sumitarora avatar Jun 06 '17 16:06 sumitarora

Here's the result of running ng version: @angular/cli: 1.0.4 node: 7.9.0 os: win32 x64 @angular/common: 4.1.3 @angular/compiler: 4.1.3 @angular/core: 4.1.3 @angular/forms: 4.1.3 @angular/http: 4.1.3 @angular/platform-browser: 4.1.3 @angular/platform-browser-dynamic: 4.1.3 @angular/router: 4.1.3 @angular/cli: 1.0.4 @angular/compiler-cli: 4.1.3

williamBurgeson avatar Jun 06 '17 17:06 williamBurgeson

I'm sorry, but we can't reproduce the problem following the instructions you provided. Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue. Short, explicit instructions make it much more likely we'll be able to reproduce the problem so we can fix it.

If the problem persists, please open a new issue following our submission guidelines.

A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

alan-agius4 avatar Sep 04 '18 06:09 alan-agius4

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.