Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Stop restricting container option based on hydrate #1313

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

Merged
eps1lon merged 2 commits into testing-library:main from eps1lon:simple-container
Apr 26, 2024

Conversation

Copy link
Member

@eps1lon eps1lon commented Apr 24, 2024
edited
Loading

Closes #1312
Closes #1311

It's really not worth it to have such extensive types just to restrict container properly. Especially because it makes composing render and renderHook so hard. And we do want to encourage wrapping render in your tests.

sveisvei reacted with hooray emoji
Copy link

codesandbox-ci bot commented Apr 24, 2024
edited
Loading

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f5f9f9e:

Sandbox Source
react-testing-library-examples Configuration

{
"extends": "../node_modules/kcd-scripts/shared-tsconfig.json",
"compilerOptions": {
"skipLibCheck": false
Copy link
Member Author

Choose a reason for hiding this comment

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

We never actually typechecked the .d.ts files before.

MatanBobi reacted with thumbs up emoji

export interface BaseRenderHookOptions<
/** @deprecated */
export type BaseRenderHookOptions<
Copy link
Member

@MatanBobi MatanBobi Apr 25, 2024

Choose a reason for hiding this comment

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

Just so I'll understand, what's the motivation with changing this one from an interface to a type?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's just an alias for RenderHookOptions whereas an interface would create a new type.

MatanBobi reacted with thumbs up emoji
@eps1lon eps1lon changed the title (削除) Stop restricting container option based on hydrate (削除ここまで) (追記) fix: Stop restricting container option based on hydrate (追記ここまで) Apr 26, 2024
@eps1lon eps1lon merged commit d143f46 into testing-library:main Apr 26, 2024
@eps1lon eps1lon deleted the simple-container branch April 26, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@MatanBobi MatanBobi MatanBobi approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Regression: Types of property hydrate are incompatible in renderHook options TypeScript error with skipLibCheck false

AltStyle によって変換されたページ (->オリジナル) /