-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Documentation is
- Missing
- Outdated
- Confusing
- Not sure?
Explain in Detail
I had a testUtils implemented like this: (overriding the default render of RTL)
import SetupProviders from "./SetupProviders";
import { render } from "@testing-library/react";
const customRender = (ui, options) => {
return render(ui, { wrapper: SetupProviders, ...options });
};
// Re-export everything
export * from "@testing-library/react";
// Override render method
export { customRender as render }; //since 6.3.* this section stopped working overrided by the import of "@testing-library/react";
I can guess this happens because the hoisting commit 8c04c69
to fix this I needed to
import {render, fireEvent, etc} from "@testing-library/react" and
export {customRender as render, fireEvent, etc}
Your Suggestion for Changes
remove the hoisting
Reproduction
No response
Steps to reproduce
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation