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

Is there a way to disable coverage? #371

Closed
srsudar opened this issue Mar 30, 2020 · 3 comments
Closed

Is there a way to disable coverage? #371

srsudar opened this issue Mar 30, 2020 · 3 comments
Labels

Comments

@srsudar
Copy link

srsudar commented Mar 30, 2020

I am debugging an issue where karma periodically opens a browser but the tests never load. I describe it in detail here, Chrome just spinning forever.

Some similar issues scattered across various repos suggest that disabling coverage is helpful in solving/debugging this sort of thing. Is there a way to disable coverage in the karma-typescript config? I don't see an obvious one.

@erikbarke
Copy link
Collaborator

Does setting karmaTypescriptConfig.coverageOptions.instrumentation to false work for you?

@srsudar
Copy link
Author

srsudar commented Mar 31, 2020

Yep that worked but it didn't fix my problem. Damn. Thanks!

@srsudar srsudar closed this as completed Mar 31, 2020
@Finesse
Copy link

Finesse commented Oct 5, 2020

Does setting karmaTypescriptConfig.coverageOptions.instrumentation to false work for you?

It doesn't disable the coverage reports in my case. This is what does:

// karma.conf.js
module.exports = (config) => {
  config.set({
    // Your Karma configuration...

    karmaTypescriptConfig: {
      reports: {}, // Disables the code coverage report
    },
  })
}

Or just remove karma-typescript from the list of reporters in the Karma configuration.

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

No branches or pull requests

3 participants