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

chore: add unit test coverage thresholds #609

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Conversation

alharris-at
Copy link
Contributor

@alharris-at alharris-at commented Jun 19, 2023

Description of changes

Add unit test coverage thresholds (currently set to min(curr_val, 80)) to prevent reduction in unit test coverage.

Info on the coverage configuration can be found here https://jestjs.io/docs/27.x/configuration#coveragethreshold-object

Line coverage refers to what % of lines are covered in the given package (in average across all files, since we're using global)
Branch coverage refers to what % of code paths are covered in the given package (in average across all files, since we're using global)
Function coverage refers to what % of functions are covered in the given package (in average across all files, since we're using global)

Issue #, if available

N/A

Description of how you validated changes

Ran unit tests.

Checklist

  • PR description included
  • yarn test passes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alharris-at alharris-at requested a review from a team as a code owner June 19, 2023 23:17
@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2023

Codecov Report

Merging #609 (6066698) into main (21bbff8) will increase coverage by 0.02%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #609      +/-   ##
==========================================
+ Coverage   85.92%   85.94%   +0.02%     
==========================================
  Files         152      152              
  Lines        7493     7490       -3     
  Branches     1959     1957       -2     
==========================================
- Hits         6438     6437       -1     
+ Misses        962      960       -2     
  Partials       93       93              
Impacted Files Coverage Δ
...codegen/src/codegen-config/AmplifyCodeGenConfig.js 47.50% <100.00%> (+0.51%) ⬆️
...ckages/amplify-codegen/src/codegen-config/index.js 95.23% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@alharris-at alharris-at merged commit 65659f9 into main Jun 20, 2023
@AaronZyLee AaronZyLee deleted the add-coverage-thresholds branch June 20, 2023 16:57
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.

4 participants