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

How to generate Coverage Report #16

Closed
edygarOliveira opened this issue Feb 12, 2018 · 4 comments
Closed

How to generate Coverage Report #16

edygarOliveira opened this issue Feb 12, 2018 · 4 comments

Comments

@edygarOliveira
Copy link

How can I genarate coverage report using karmatic? I've tried with a karma.conf.js with karma-coverage but I hadn't succeed.

Here follows my

module.exports = function(config) {
  config.set({
    files: ["src/**/*.js", "test/**/*.js"],

    // coverage reporter generates the coverage
    reporters: ["progress", "coverage"],

    preprocessors: {
      // source files, that you wanna generate coverage for
      // do not include tests or libraries
      // (these files will be instrumented by Istanbul)
      "src/**/*.js": ["coverage"]
    },

    // optionally, configure the reporter
    coverageReporter: {
      type: "html",
      dir: "coverage/"
    }
  });
};
@edygarOliveira edygarOliveira changed the title Coverage report How to generate Coverage Report Feb 12, 2018
@developit
Copy link
Owner

Might be worth baking this into Karmatic itself. Would you be willing to PR?

@edygarOliveira
Copy link
Author

edygarOliveira commented Feb 16, 2018

I'd have PR'd but couldn't even install locally without errors due to developit/microbundle#74

@developit
Copy link
Owner

Yup, sounds like we have to sort that out first :/

@andrewiggins
Copy link
Collaborator

FYI for posterity and anyone following this issue, #26 adds code coverage to karmatic. Give it a try and let me know if it works for you!

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

No branches or pull requests

3 participants