Skip to content

Sys 287 jest it up #39

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

Merged
merged 7 commits into from
Aug 21, 2024
Merged

Sys 287 jest it up #39

merged 7 commits into from
Aug 21, 2024

Conversation

TieDyedSheep
Copy link
Contributor

This will need to be merged into dev to test the functionality. This adds jest-it-up to track coverage historically in the repo's jest config. After this is merged there are a few test cases that will be somewhat difficult to test but this is coded so that we should be able to migrate the changes without any impact to anything without an npm script for test:coverage. this will look to see if test:coverage exists and if it does it will assume the repo running CI is using jest and will use jest-it-up to store current coverage requirements.

this will use both the most recent coverage levels as well as a global variable (that can be overridden at the repo level) to determine "target coverage". The intention is to require coverage to stay the same or improve until it hits the target coverage (currently 80%) and once it hits target coverage, it just has to stay above that target.

ex: initially starts with 0% in jest config. runs and his 50%. Next run must be 50% or higher or the build will fail. Once it gets past 80% coverage could go up to 90% and drop back down to 80% and still pass the build.

@TieDyedSheep TieDyedSheep requested a review from a team August 15, 2024 02:17
Copy link

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Key issues to review

Script Logic
The script checks for test:coverage and runs it if available, otherwise, it defaults to npm run test. However, the logic to handle the coverage results and the conditions under which the build should fail or pass might need further refinement to ensure they align with the intended workflow requirements.

Coverage Thresholds
The coverage thresholds are set to 0, which might not be effective for ensuring code quality. Consider setting meaningful initial thresholds to enforce a minimum coverage standard.

chrypnotoad
chrypnotoad previously approved these changes Aug 20, 2024
@TieDyedSheep TieDyedSheep merged commit 23a691a into dev Aug 21, 2024
7 checks passed
@TieDyedSheep TieDyedSheep deleted the SYS-287-jest-it-up branch August 21, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants