Closed
Description
Bug Report or Feature Request (mark with an x
)
- [x] feature request
Command (mark with an x
)
- [x] new
- [x] update
Versions
D:\temp>node --version
v8.11.2
D:\temp>npm --version
5.6.0
D:\temp>ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ ? \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.0.7
Node: 8.11.2
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.6.7
@angular-devkit/core 0.6.7
@angular-devkit/schematics 0.6.7
@schematics/angular 0.6.7
@schematics/update 0.6.7
rxjs 6.2.0
typescript 2.7.2
OS: Windows 7
Repro steps
ng new foo
- Open
angular.json
and check the settings forprojects > foo > architect > test
The log given by the failure
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
Desired functionality
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
],
"sourceMap": true // <--- This setting should be included by default
}
Mention any other details that might be useful
When this setting is not included in the project, ng test --code-coverage
produces incorrect coverage reporting for the Angular project. The sourceMap
setting must be added to the CLI settings to get correct coverage reporting.
Please include this setting in all new projects generated by the CLI.
When using the CLI to upgrade to a new angular version, if this setting is not explicitly set in angular.json
, the setting should be added.
Please update the CLI so that it sets the right config out of the box.
Thanks
Metadata
Metadata
Assignees
Labels
No labels