Closed chernando closed 8 years ago
Hi!
Trying to limit the istanbul reporters to JSON with
.pipe(istanbul.writeReports({ reporters: ['json'] }));
I observed that other reporters were called too.
The problem is _.defaultsDeep doesn't work as expected in this situation.
_.defaultsDeep
var opts = {reporters: ['json']} var opts = _.defaultsDeep(opts, {reporters: [ 'lcov', 'json', 'text', 'text-summary' ]} ) console.log(opts)
returns
{ reporters: ["json", "json", "text", "text-summary"] }
As a quick fix, I'm using
.pipe(istanbul.writeReports({ reporters: ['json', 'json', 'json', 'json'] }));
;-)
Moving reporters out of _.defaultsDeep does the trick.
reporters
Thanks for sending a fix! Sorry for the slow reaction, I'm in vacation right now with limited access to internet :(
Hi!
Trying to limit the istanbul reporters to JSON with
I observed that other reporters were called too.
The problem is
_.defaultsDeep
doesn't work as expected in this situation.returns
As a quick fix, I'm using
;-)
Moving
reporters
out of_.defaultsDeep
does the trick.