Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
P3tronius opened this issue Oct 11, 2018 · 1 comment
Open

Comments

@P3tronius
Copy link

P3tronius commented Oct 11, 2018

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!

@dylans
Copy link
Contributor

dylans commented Oct 15, 2018

@Petronious if you would like to add a PR to create a configuration setting for this (with the default remaining unchanged), I'm happy to review and land it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants