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

Location of generated coverage reports

Open victormejia opened this issue 8 years ago • 4 comments

Versions

Angular CLI: 6.0.0-rc.6
Node: 8.11.1
OS: darwin x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.5.8
@angular-devkit/core         0.5.8
@angular-devkit/schematics   0.5.8
@ngtools/json-schema         1.1.0
@schematics/angular          0.5.8
@schematics/update           0.5.8
rxjs                         6.0.0
typescript                   2.7.2

Repro steps

  • ng new sample-app
  • ng test --code-coverage

Observed behavior

Coverage reports get generated under src/ folder.

Desired behavior

Usually this was generated at the root. Is this by design?

victormejia avatar Apr 26 '18 20:04 victormejia

A side effect of running this:

ng test --code-coverage --watch`

The tests continually run in a loop since coverage reports get generated under src/ which then triggers the watch, which triggers the suite to run again.

victormejia avatar Apr 26 '18 21:04 victormejia

I had the same problem (+ side effect). Quick fix:

  • Open src/karma.conf.js
  • Change dir: require('path').join(__dirname, 'coverage'), to dir: require('path').join(__dirname, '../coverage'),

MarcScheib avatar Apr 27 '18 09:04 MarcScheib

This isn't an issue anymore with the latest RC 10. Closing.

victormejia avatar May 03 '18 08:05 victormejia

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.