-
Notifications
You must be signed in to change notification settings - Fork 525
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
Replace Enzyme with React Testing Library #2195
Comments
@becca-bailey I can start work on victory-bar. |
#2216 for victory-bar tests should be good to go, I'm moving on to victory-box-plot. |
I'm going to start work on |
I am working on victory-errorbar next. |
I'm picking up victory-histogram now |
#2255 is up for the histogram tests, moving on to |
Moving on to |
The modules that were excluded from this conversion are |
In addition to some of the general issues with our tests being a little slow and out of date, we will need to replace Enzyme as our method of rendering components in tests if we want to upgrade to React 18+.
We should re-write our existing tests using Jest + React Testing Library.
Related issue: #2187
See also: https://dev.to/wojtekmaj/enzyme-is-dead-now-what-ekl
Completed packages
General tips and pointers
querySelector
in a test to test attributes on SVG elements.getByRole
orgetByTestId
to isolate specific nodes. Add safe user props to all top-level components #2191 should allow us to adddata-testid
to our test components, but there may be some primitive components that need to be set up to work with these user-provided props..toMatchInlineSnapshot
, provided that the snapshot is focused (< 10 lines) and easy to read.Long-term, we might want to figure out how to test data transformations in a different place.
The text was updated successfully, but these errors were encountered: