Recently, I have been noticing LOG: 'a' before each of my tests. Not sure how to disable it. There are 3600 console.log's in my project, ALL of them from dependencies.
Karma version: 0.11.14
@AlexCppns set client.captureConsole to equal false
//karma.config.js
client: {
captureConsole: false
}
Well that works but I don't necessarily want to disable all logs, I just want to know where that log in particular comes from.
Yes, Alex, it's a crappy answer. At least you can see your logs, mine are via $logProvider and Karma helpfully hides them. Because of course nobody needs logging in a unit test. ffs
same issue - annoying!
http://karma-runner.github.io/2.0/config/configuration-file.html
browserConsoleLogOptions
Type: Object
Default:{level: "debug", format: "%b %T: %m", terminal: true}
Set it to browserConsoleLogOptions: { level: 'warn' }, in karma.conf.js.
The downside is that if you want to log something for debugging, you need to use warn() or error().
The %T in the format string is the log level, if you change format to %m you will only see the mssage.
browserConsoleLogOptions: { level: "debug", format: "%m", terminal: true}
Most helpful comment
@AlexCppns set
client.captureConsoleto equalfalse