Skip to content

Generate code coverage reports using nyc#1170

Merged
epicfaace merged 1 commit intomasterfrom
code-coverage
Feb 12, 2019
Merged

Generate code coverage reports using nyc#1170
epicfaace merged 1 commit intomasterfrom
code-coverage

Conversation

@LucianBuzzo
Copy link
Collaborator

Change-type: patch
Signed-off-by: Lucian lucian.buzzo@gmail.com

Reasons for making this change

Having code coverage reports is useful for detecting uncovered code paths.

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
    • I've run npm run cs-format on my branch to conform my code to prettier coding style
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@epicfaace
Copy link
Member

Looks good, but I think we should find a way to publish the reports. Could we maybe integrate travis ci and nyc? Or, maybe it's better to use a tool such as code climate instead so it can easily be published?

Copy link
Collaborator

@edi9999 edi9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much does this slow down the tests ?

Can you measure time before / after ?

If it slows down significantly, I would suggest to create a special command in package.json for this (npm test-coverage for example)

@epicfaace
Copy link
Member

How much does this slow down the tests ?

Can you measure time before / after ?

If it slows down significantly, I would suggest to create a special command in package.json for this (npm test-coverage for example)

Yeah, I think making a special command is the right way to go, as one wouldn't need to create code coverage reports each time one runs the tests, right?

@LucianBuzzo
Copy link
Collaborator Author

@edi9999 @epicfaace I ran some tests locally and saw, on average, a time increase of ~5s. Whilst this is not a huge increase it is proportionally significant when you consider that the average test run without coverage is only 10s. I'll add a separate command for running the coverage report.
Code climate looks interesting, how about we open a new issue about integrating it into this project?

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
@epicfaace
Copy link
Member

Looks good; let's do that.

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

Successfully merging this pull request may close these issues.

3 participants