Closed
Description
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x
)
- [ ] new
- [ ] build
- [ ] serve
- [x] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
node v8.9.4
npm v6.4.1
Mac OS Mojave
Angular CLI: 6.2.4
Angular: 6.1.9
Repro steps
- ng new test-app
- create
packages/test-package
outside ofsrc
folder - add there simple
test.component.ts
andtest.component.spec.ts
- Modify
test.ts
file and add context of 'packages directory
replace
const 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",
totsconfig.spec.json
in"include"
section -
ng test --code-coverage and open
coverage/index.html
Description
Files from packages
directory don't include in final coverage report
Desired functionality
All files despite on their location should be presented in final coverage report
Metadata
Metadata
Assignees
Labels
No labels