Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[core] Replace enzyme in describeConformance #42447
[core] Replace enzyme in describeConformance #42447
Changes from all commits
01660be
c984272
96d29af
a891f02
ae0b1da
d0b2593
aceac7d
3a6ae48
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Here, we lose the aspect of testing that the inherited component is being used and only maintain that the props are spread into whatever the component considers its root.
This follows RTL's principle of not testing implementation details. There might be a way for us to test that the inherited component is the one used, but I think it would be better to test that on each component's tests, by testing the expected functionality, classes, or whatever the inherited component provides.
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.
AFAIK this is mostly used by the doc gen to add a message about additional props available on a component. I'm strongly in favor of removing this message and listing all available props on each component, so it's not necessary to jump between the pages to learn about available props. Afterwards, this test may be unnecessary.
Not in this PR, of course :)
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.
This was required as Base UI's
describeConformance
accepts async render functions. We could support those in the basicdescribeConformance
test, but I wanted to keep the changes minimal, especially considering this base code is stale. Let me know if making the originaltestClassName
async would be better.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.
Async render functions will be required when Material UI uses Floating UI. Certain interactions require flushing the microtask queue, which is an async operation. This is not strictly required now, so I agree it's ok to minimize the number of changes in this PR.