mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
changing order of event and coverage reporters
Fixing an issue when event reporter is executed before coverage reporter, which was causing the test command to pass even though unit testing coverage thresholds were not met.
This commit is contained in:
parent
839c1f8a8d
commit
09d019e733
@ -67,6 +67,13 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
|
||||
failureCb = config.buildWebpack.failureCb;
|
||||
|
||||
config.reporters.unshift('@angular-devkit/build-angular--event-reporter');
|
||||
|
||||
// When using code-coverage, auto-add coverage-istanbul.
|
||||
config.reporters = config.reporters || [];
|
||||
if (options.codeCoverage && config.reporters.indexOf('coverage-istanbul') === -1) {
|
||||
config.reporters.unshift('coverage-istanbul');
|
||||
}
|
||||
|
||||
// Add a reporter that fixes sourcemap urls.
|
||||
if (options.sourceMap) {
|
||||
config.reporters.unshift('@angular-devkit/build-angular--sourcemap-reporter');
|
||||
@ -107,12 +114,6 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
|
||||
config.webpack = Object.assign(webpackConfig, config.webpack);
|
||||
config.webpackMiddleware = Object.assign(webpackMiddlewareConfig, config.webpackMiddleware);
|
||||
|
||||
// When using code-coverage, auto-add coverage-istanbul.
|
||||
config.reporters = config.reporters || [];
|
||||
if (options.codeCoverage && config.reporters.indexOf('coverage-istanbul') === -1) {
|
||||
config.reporters.push('coverage-istanbul');
|
||||
}
|
||||
|
||||
// Our custom context and debug files list the webpack bundles directly instead of using
|
||||
// the karma files array.
|
||||
config.customContextFile = `${__dirname}/karma-context.html`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user