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

EREGCSC-2746 -- Upgrade Vitest front end unit tests in key portions of the code #1503

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

PhilR8
Copy link
Contributor

@PhilR8 PhilR8 commented Dec 17, 2024

Resolves EREGCSC-2746

Description

In support of our goal of 80% test coverage for all code in codebase, this Pull Request increases coverage in front end Javascript code in the form of unit tests written for Vitest.

This story's Acceptance Criteria specifically lists the following:

  • Utilities have good test coverage, according to code review
    • "Utilities" refers to all files located in /solution/ui/regulations/utilities/
    • These files contain reusable utility methods, API methods, and Options API Filter Methods
  • Improved coverage for other components that are reused multiple times

This pull request changes:

  • Increases Vitest unit test cases from 99 tests to 215 tests

  • Increases /solution/ui/regulations/utilities/ test coverage to at least 80% for all coverage metrics

    Before Current Change
    Statment % 67 83 +16
    Branch % 82 92 +10
    Function % 33 83 +50
    Lines % 67 83 +16
  • Increases overall front end Javascript test coverage

    Before Current Change
    Statment % 28 33 +5
    Branch % 70 79 +9
    Function % 35 53 +18
    Lines % 28 33 +5

Steps to manually verify this change:

  1. Green check marks
  2. Run Vitest locally
    • make test.vitest.ui
  3. All Vitest test pass and coverage metrics match percentages above to the nearest percent

Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

Copy link

github-actions bot commented Jan 2, 2025

✨ See the Django Site in action

@PhilR8 PhilR8 marked this pull request as ready for review January 2, 2025 13:59
@PhilR8 PhilR8 requested a review from cgodwin1 as a code owner January 2, 2025 13:59
@PhilR8 PhilR8 added the Needs Review This PR needs a code review label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review This PR needs a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant