Skip to content

Commit 4023295

Browse files
committed
refactor(@angular-devkit/build-angular): remove redundant event reporter from karma plugin
Removes the `@angular-devkit/build-angular--event-reporter` and its logic. The reporter was no longer performing significant work after the removal of custom callbacks, and its primary remaining function was a logging hack that is no longer required.
1 parent 12ab759 commit 4023295

File tree

1 file changed

+0
-15
lines changed
  • packages/angular_devkit/build_angular/src/tools/webpack/plugins/karma

1 file changed

+0
-15
lines changed

packages/angular_devkit/build_angular/src/tools/webpack/plugins/karma/karma.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ const init: any = (config: any, emitter: any) => {
5555
);
5656
}
5757

58-
config.reporters.unshift('@angular-devkit/build-angular--event-reporter');
59-
6058
// When using code-coverage, auto-add karma-coverage.
6159
if (
6260
options.codeCoverage &&
@@ -181,18 +179,6 @@ function muteDuplicateReporterLogging(context: any, config: any) {
181179
}
182180
}
183181

184-
// Emits builder events.
185-
const eventReporter: any = function (this: any, baseReporterDecorator: any, config: any) {
186-
baseReporterDecorator(this);
187-
188-
muteDuplicateReporterLogging(this, config);
189-
190-
// avoid duplicate failure message
191-
this.specFailure = () => {};
192-
};
193-
194-
eventReporter.$inject = ['baseReporterDecorator', 'config'];
195-
196182
// Strip the server address and webpack scheme (webpack://) from error log.
197183
const sourceMapReporter: any = function (this: any, baseReporterDecorator: any, config: any) {
198184
baseReporterDecorator(this);
@@ -246,7 +232,6 @@ function fallbackMiddleware() {
246232
module.exports = {
247233
'framework:@angular-devkit/build-angular': ['factory', init],
248234
'reporter:@angular-devkit/build-angular--sourcemap-reporter': ['type', sourceMapReporter],
249-
'reporter:@angular-devkit/build-angular--event-reporter': ['type', eventReporter],
250235
'middleware:@angular-devkit/build-angular--blocker': ['factory', requestBlocker],
251236
'middleware:@angular-devkit/build-angular--fallback': ['factory', fallbackMiddleware],
252237
};

0 commit comments

Comments
 (0)