- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.1k
Closed
Labels
TypeScriptRelated to TypeScript. Note: only certain maintainers handle TypeScript labeled issues.Related to TypeScript. Note: only certain maintainers handle TypeScript labeled issues.bugSomething isn't workingSomething isn't working
Description
- @testing-library/reactversion: 12.1.1
- Testing Framework and version: jest @ 27.2.2
- DOM Environment: 5.14.1
Relevant code or config:
type AppWrapperProps = {
  userProviderProps?: UserProviderProps
}
export const AppWrapper: React.FC<AppWrapperProps> = ({
  children,
  userProviderProps = { user: mockUser },
}) => (
  <UserProvider {...userProviderProps}>
...What you did:
Upgraded @testing-library/react to 12.1.1
What happened:
Type for wrapper broken in #966
Reproduction:
Use wrapper component that has some props that can be passed
Problem description:
The type being inflexible (only allowing children) means that the wrapper can't take props if used anywhere else
Suggested solution:
Something like wrapper?: React.ComponentType<React.PropsWithChildren>
tu4mo and bfaulk96
Metadata
Metadata
Assignees
Labels
TypeScriptRelated to TypeScript. Note: only certain maintainers handle TypeScript labeled issues.Related to TypeScript. Note: only certain maintainers handle TypeScript labeled issues.bugSomething isn't workingSomething isn't working