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

Add async render APIs #1365

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

Closed
eps1lon wants to merge 2 commits into testing-library:main from eps1lon:sebbie/async-act
Closed

Conversation

Copy link
Member

@eps1lon eps1lon commented Nov 25, 2024
edited
Loading

Not final. For internal testing for now. Alternate to #1214

  • render(...) -> await renderAsync(...)
  • act(...) -> await actAsync(...)
  • cleanup(...) -> await cleanupAsync(...)
  • renderHook(...) -> await renderHookAsync(...)

Copy link

codesandbox-ci bot commented Nov 25, 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 9d9778c:

Sandbox Source
react-testing-library-examples Configuration

Comment on lines +19 to +21
return await React.act(async () => {
scope()
})
Copy link
Member

Choose a reason for hiding this comment

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

pretty sure this should be

Suggested change
return await React.act(async () => {
scope()
})
return await React.act(async () => {
awaitscope()
})

or

Suggested change
return await React.act(async () => {
scope()
})
return await React.act(async () => {
returnscope()
})

eps1lon reacted with thumbs up emoji
Copy link
Member Author

eps1lon commented Dec 5, 2024

We'll with #1214 since this approach doesn't work for libraries like user-event that rely on configure()

phryneas and MatanBobi reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@phryneas phryneas phryneas left review comments

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

Successfully merging this pull request may close these issues.

2 participants

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