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

[code-infra] Fix @mui/internal-test-utils screen export type #43150

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages-internal/test-utils/src/createRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -740,5 +740,5 @@ function act<T>(callback: () => void | T | Promise<T>) {
const bodyBoundQueries = within(document.body, { ...queries, ...customQueries });

export * from '@testing-library/react/pure';
export { act, cleanup, fireEvent };
export const screen: Screen = { ...rtlScreen, ...bodyBoundQueries };
export { act, fireEvent };
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup is already exported on L742 above.
I don't see the need to duplicate/override the export. 🤷

export const screen: Screen & typeof bodyBoundQueries = { ...rtlScreen, ...bodyBoundQueries };