Skip to content

Commit

Permalink
fix(karma): Always initilize reporter adapters
Browse files Browse the repository at this point in the history
Intelij's plugin is using karma multi reporter which expects adaper array of each reporter to be initialized. Moving adaper array initialization before the isKarmaConfigAppropriate check in order to satisfy that contract.

re #254
  • Loading branch information
Branislav Abadzhimarinov committed Nov 12, 2021
1 parent d15ee45 commit 6be0c8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export const sabarivkaReporter: KarmaReporter = Object.defineProperty(
karmaConfig: KarmaOptions,
logger: Logger
): void {
this.adapters = [];
if (!isKarmaConfigAppropriate(karmaConfig, logger)) {
return;
}

}
this.onBrowserComplete = getFileInstrumenterFn(karmaConfig);
this.adapters = [];
},
'$inject',
{
Expand Down

0 comments on commit 6be0c8a

Please sign in to comment.