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

DATAP-1336 Removed all references to Enzyme testing library #527

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

cdmh219
Copy link
Collaborator

@cdmh219 cdmh219 commented Aug 14, 2024

GitHub Actions has been upgraded to use Node 20, but our CCDB project is on Node 16. As a result, while all of our Enzyme tests are running successfully locally, they are failing in the CI job, due to references to the TextEncoder (as part of the util library) being removed.

As a quick fix, the Enzyme dependencies will be removed, and all of its associated tests will be commented.

Additions

Removals

  • enzyme
  • enzyme-adapter-react-16
  • References to Enzyme in setupTests.js
  • Unit tests using Enzyme

Changes

  • Code coverage thresholds

Testing

Screenshots

Notes

  • Code coverage thresholds have been lowered temporarily, until all tests previously written with Enzyme are replaced with Testing Library.

Todos

  • Updating of commented tests using Testing Library
  • Changing of code coverage thresholds back to previous numbers

Checklist

  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the front end playbook
  • Passes all existing automated tests
  • New functions include new tests
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged
  • Visually tested in supported browsers and devices
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)

@cdmh219 cdmh219 requested a review from flacoman91 August 14, 2024 22:30
@cdmh219 cdmh219 marked this pull request as ready for review August 15, 2024 15:08
@cdmh219 cdmh219 changed the title Removed all references to Enzyme testing library DATAP-1336 Removed all references to Enzyme testing library Aug 15, 2024
Copy link
Contributor

@flacoman91 flacoman91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Good for a stopgap. as you update the tests, we can start to increase the code coverage thresholds in package.json

@flacoman91 flacoman91 added this pull request to the merge queue Aug 15, 2024
Merged via the queue into main with commit b5b595d Aug 15, 2024
2 checks passed
@flacoman91 flacoman91 deleted the Remove-Enzyme-References branch August 15, 2024 16:19
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.

2 participants