Skip to content

Add an option to hide messages "Error: Could not find source map for:" #174

@P3tronius

Description

@P3tronius

Hello,

We are using remap-istanbul in an hybrid angularJS/Angular6 project, so we have js and ts files in it.
Our Karma config runs all the tests (js+ts) in one run, so we have only one coverage file for sonarQube to work correctly.

The problem we have, is that remap-istanbul prints a message (not fatal) when it can't find the sourcemap file for all js files. That make a pretty concequent output, as it is a big project.

It would be nice to add an option to hide thoses logs :)
Here is the stack:

Error: Could not find source map for: "[...path removed...].js" at CoverageTransformer.addFileCoverage (..../node_modules/remap-istanbul/lib/CoverageTransformer.js:169:17) at node_modules/remap-istanbul/lib/CoverageTransformer.js:295:14 at CoverageTransformer.addCoverage (..../node_modules/remap-istanbul/lib/CoverageTransformer.js:293:24) at ..../node_modules/remap-istanbul/lib/remap.js:51:13 at Array.forEach (<anonymous>) at remap (..../node_modules/remap-istanbul/lib/remap.js:50:16) at KarmaRemapIstanbul.onRunComplete (..../node_modules/karma-remap-istanbul/index.js:58:23)
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions