You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
initSourcemapReporter causes double logs to the console #9528
Install karma-mocha-reporter and add it to the plugins array
replace progress with mocha in the reporters array in karma.conf.js
Add a console.log('TEST') to one of your tests
See it being logged twice
(By the way, it also happens with karma-spec-reporter, so it isn't just a mocha-reporter thing)
Observed behavior
Console logs are being logged twice because the initSourcemapReporter inherits from the base reporter which implements the onBrowserLog function by default, so every log the browser emits is being logged by every reporter that doesn't override the write method.
Desired behavior
I want console.logs from test to be displayed only once when reporting using different reporters
Mention any other details that might be useful (optional)
I'm about to submit a PR which fixes this.
Another possible fix is to change the behavior in Karma, but that's out of this repo's scope.
Activity
fix(@angular/cli): remove double console logs with different reporters
fix(@angular/cli): remove double console logs with different reporters
fix(@angular/cli): remove double console logs with different reporters
fix(@angular/cli): remove double console logs with different reporters
angular-automatic-lock-bot commentedon Sep 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(@angular/cli): remove double console logs with different reporters