You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the primary test renderer enzyme does not have a supported adapter for React 18
the current React recommendation for test frameworks is to use jest and react-testing-library; these seemingly have better integration with newer React features than enzyme or mocha
Update: I rebased the aforementioned branch and made a few updates to get linting + coverage working with latest main. The coverage stats show that this covers roughly 6% of the components and 4% of the whole frontend folder. An assortment of thoughts with no particular end goal:
Switching from enzyme to RTL (without making changes to the underlying test intent) is a bit of a chore but also maybe could be partially automated with some regex?
The non-component tests only need to be switched from chai to jest, which is mostly a matter of different assertion names. This is also a bit of a chore and maybe could be partially automated.
The test logic itself probably needs a once over. That seems like a big undertaking to do all at once, maybe it could happen in conjunction with component updates on some sort of ongoing basis
As part of a broader React and related dependency upgrade, we likely need to significantly change our current test suite:
enzyme
does not have a supported adapter for React 18jest
andreact-testing-library
; these seemingly have better integration with newer React features thanenzyme
ormocha
Notes
Tasks
@shared/GithubBuildBranchLink.jsx
#4670@shared/GithubBuildShaLink.jsx
#4669@shared/ButtonLink.jsx
#4672@shared/UsaIcon.jsx
#4668@shared/GithubAuthButton.jsx
#4671The text was updated successfully, but these errors were encountered: