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

Feature/expand jest config #131

Merged
merged 4 commits into from
Jul 1, 2019
Merged

Conversation

michaeljaltamirano
Copy link
Contributor

@michaeljaltamirano michaeljaltamirano commented Jul 1, 2019

This PR expands our jest.config.js file.

  1. It removes the jest-config import because we're only relying on it to ignore node_modules. It's clearer to include that explicitly.
  2. It adds coverage thresholds to our components (that currently pass) so we can maintain sufficient code coverages on the components, and enforce it.

The intent of this (and #130) is to make greater use of the tools we're using offer. In particular the coverage thresholds will help us stay sharp when we make changes and/or add components to the library, to ensure that we're including sufficient testing for those changes.

@snags88 snags88 temporarily deployed to curology-radiance-pr-131 July 1, 2019 17:37 Inactive
Copy link
Contributor

@daigof daigof left a comment

Choose a reason for hiding this comment

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

Im not very good at this config/devops things, but if it works it works.
Im curious what happen if we dont meet the coverage threshold???

@michaeljaltamirano
Copy link
Contributor Author

michaeljaltamirano commented Jul 1, 2019

Im not very good at this config/devops things, but if it works it works.
Im curious what happen if we dont meet the coverage threshold???

@daigof What should happen, with the pre-push in #130, is that the commits will not push until the threshold is met again. Here's what it looks like in the terminal:

Screen Shot 2019-07-01 at 10 53 17 AM

(I raised the thresholds to 99% to induce the errors but the set thresholds in this PR are just below our current coverage, so it is just about maintaining our current coverage instead of adding additional work.)

Copy link
Contributor

@snags88 snags88 left a comment

Choose a reason for hiding this comment

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

This is a great addition. We should add this to Gatsby since we already have snapshot tests for most of our components there.

I already see that we have this in our demos & discussions board. We should definitely consider adding this to PocketDerm as well

@michaeljaltamirano michaeljaltamirano merged commit 9cff986 into master Jul 1, 2019
@michaeljaltamirano michaeljaltamirano deleted the feature/expand-jest-config branch July 3, 2019 20:59
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