我需要将日志记录和测试结果写入控制台,所以我有
client {
captureConsole: true,
}
和
reporters: ['spec', 'junit'],
specReporter: {
maxLogLines: 5, // limit number of lines logged per test
suppressErrorSummary: false, // do not print error summary
suppressFailed: false, // do not print information about failed tests
suppressPassed: false, // do not print information about passed tests
suppressSkipped: true, // do not print information about skipped tests
showSpecTiming: true // print the time elapsed for each spec
},
在业力中。但这导致每个console.log被写两次,如:
LOG LOG:' ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ' Chrome日志: ' ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'
。有没有办法配置规范记者或业力,以便console.log不被公开?
UPD :似乎是一个已知问题:https://github.com/karma-runner/karma/issues/1873