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

fix(jest): correctly set coverageThreshold #2529

Merged
merged 1 commit into from Jul 4, 2020

Conversation

charlieTheBotDev
Copy link
Contributor

@charlieTheBotDev charlieTheBotDev commented Jun 24, 2020

coverageThreshold was never being set in jestConfig as it is an object

See https://jestjs.io/docs/en/configuration.html#coveragethreshold-object

Note: https://stenciljs.com/docs/testing-config doesn't mention anything about it being a special option so if it should be a string then the docs need updating instead of merging this PR.

I also tried using JSON.stringify to set it but that just made Jest fall over with:

[ ERROR ]  runJest: ● Validation Error:   Option
           "coverageThreshold" must be of type:  object  but
           instead received:  string   Example:  {
            "coverageThreshold": {  "global": {  "branches":
           50,  "functions": 100,  "lines": 100,
           "statements": 100  }  }  }
           Configuration Documentation:  https://jestjs.io/docs/configuration.html

`coverageThreshold` was never being set in `jestConfig` as it is an object

See https://jestjs.io/docs/en/configuration.html#coveragethreshold-object
@manucorporat manucorporat merged commit 915bfce into ionic-team:master Jul 4, 2020
@manucorporat
Copy link
Contributor

Thanks for your PR!

@charlieTheBotDev charlieTheBotDev deleted the patch-1 branch July 6, 2020 04:47
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.

None yet

2 participants