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

Stop using Enzyme #151

Merged
merged 7 commits into from
Aug 21, 2022
Merged

Stop using Enzyme #151

merged 7 commits into from
Aug 21, 2022

Conversation

qntm
Copy link
Owner

@qntm qntm commented Aug 21, 2022

Per enzymejs/enzyme#2518 (comment), enzyme is obviously no longer actively maintained. This PR moves us to use @testing-library/react instead.

As a part of this I first migrated from using shallow to using mount in unit testing - shallow was always a poor choice and really should not have been used. Then, I migrated to using data-testid properties instead of class selectors, which is also a better approach overall. Some older unit tests have been scrapped. Some very detailed assertions regarding <Game>'s internal state have had to be scrapped. I might need to figure out a better approach to this. Also, no more snapshot testing. Does <Well> even really need its own unit tests? Lastly, <Game> has been modified to actually render certain startup errors, instead of just throwing. This was done just because it was easier to maintain.

Up next: esbuild, maybe? Probably some upgrades to newer versions of React, too. And, I need to make those replay tests faster and more efficient. Hooks? And there are a few bugs to address: whitespace in replays, and asynchronous AIs.

@qntm qntm merged commit eac0d9f into main Aug 21, 2022
@qntm qntm deleted the cleanup branch August 21, 2022 19:39
JSReds pushed a commit to balena-io-modules/rendition that referenced this pull request Oct 10, 2024
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.

1 participant