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

[EASI-3250] - Migrate cra to vite #693

Merged
merged 33 commits into from
Sep 18, 2023

Conversation

patrickseguraoddball
Copy link
Contributor

EASI-3250

Changes and Description

  • Migrated from CRA to Vite
    • Env variables are now accessed with import.env instead of process.env
  • Migrated unit test runner from Jest to Vitest
    • The only real change to how we write our unit tests is using vi.mock, vi.fn, etc instead of jest.fn
    • Mocking the Okta sign-in widget is not supported in Vite, so these tests were removed since it's already covered in our e2e tests (Tests that use a canvas don't support threads in Vitest, so we removed the test in favor of being able to run the tests in a threaded environment for the sake of runtime)
    • Snapshots - updates were mostly small text and format changes (Ex: "Jest snapshot" text to "Vitest snapshot")
  • Updated dependencies to get rid of errors during migration:
    • Apollo
    • Cypress
    • Storybook
    • React-csv

Other Changes

Note: Running unit tests with threads turned off currently causes some tests to fail (bug explanation here)

How to test this change

  • Build app locally and make sure everything works as expected
  • Run unit tests
  • Run e2e tests

PR Author Review Checklist

  • Met the ticket's acceptance criteria, or will meet them in a subsequent PR.
  • Added or updated tests for backend resolvers or other functions as needed.
  • Added or updated client tests for new components, parent components, functions, or e2e tests as necessary.
  • Tested user-facing changes with voice-over and the rotor menu

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.
  • Always make comments, even if it's minor, or if you don't understand why something was done.

@patrickseguraoddball patrickseguraoddball requested review from garyjzhao and removed request for a team September 13, 2023 19:14
@patrickseguraoddball patrickseguraoddball merged commit c466cc4 into main Sep 18, 2023
9 checks passed
@patrickseguraoddball patrickseguraoddball deleted the EASI-3250/migrate-cra-to-vite branch September 18, 2023 18:14
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