x)- [x] bug report -> please search issues before submitting
- [ ] feature request
x)- [ ] new
- [ ] build
- [ ] serve
- [x] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
node v8.9.4
npm v6.4.1
Mac OS Mojave
Angular CLI: 6.2.4
Angular: 6.1.9
packages/test-package outside of src foldertest.component.ts and test.component.spec.tstest.ts file and add context of 'packages directoryconst context = require.context('./', true, /\.spec\.ts$/);
context.keys().map(context1);
with
const context1 = require.context('../packages', true, /\.spec\.ts$/);
const context2 = require.context('./', true, /\.spec\.ts$/);
context1.keys().map(context1);
context2.keys().map(context2);
Add "../packages/**/*.spec.ts", to tsconfig.spec.json in "include" section
ng test --code-coverage and open coverage/index.html
Files from packages directory don't include in final coverage report
All files despite on their location should be presented in final coverage report
This is actually by design, Only files under sourceRoot are listed in the code coverage report. Anything which is not under sourceRoot is considered as external.
It would be great if we could supply an optional list of external directories to include. (perhaps in angular.json?)
That commit completely broke coverage reporting in my team's mono-repo setup :(
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._
Most helpful comment
It would be great if we could supply an optional list of external directories to include. (perhaps in
angular.json?)That commit completely broke coverage reporting in my team's mono-repo setup :(