-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[test] Convert remaining enzyme tests to testing-library #26832
Conversation
); | ||
expect(wrapper.text()).to.equal(''); | ||
|
||
expect(container.firstChild).to.equal(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argueably a clearer assertion since there's a different between an element with no text and no element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing with enzyme is still valuable for us
Do you mean for some of the tests in the describeConformance, or as a mean to make sure that our components have minimum level of support of enzyme?
As part of describeConformance i.e. strictly internal |
Ok, so we could potentially accept a PR that rewrites the |
A big "If" though. I don't understand why this is important though. I wouldn't waste a second thinking about dropping enzyme. |
@eps1lon Ok, thanks for the extra input. I wouldn't say it's important. I was wondering about the contingency plan in case of enzyme prevents us to upgrade React: enzymejs/enzyme#2524 (comment). |
In the past we just forked the adapter which is fairly straight forward for the set of features we need. So there's no point in being concerned about this right now. Especially since the 17 adapter works just fine with React 18 alpha. |
This removes direct usage of enzyme from our internal testing API. It'll be only used internally-internally (i.e. not by collaborators writing tests but collaborators working on the testing API).
Testing with enzyme is still valueable for us. It was just too easy to write bad tests with enzyme.
This'll make it easier to debug these tests in React 18
Closes #22911