Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testing-library/react-testing-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v15.0.6
Choose a base ref
...
head repository: testing-library/react-testing-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c1f2957a219ec7e6a6159a57c5d0717655c515cd
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 7, 2024

  1. fix: Ensure act is not any when React.act is not declared (#1323)

    eps1lon authored May 7, 2024
    Copy the full SHA
    c1f2957 View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 types/index.d.ts
3 changes: 2 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
@@ -251,6 +251,7 @@ export function cleanup(): void
* If that's not available (older version of react) then it
* simply calls the deprecated version which is ReactTestUtils.act(cb)
*/
export const act: typeof reactAct extends never
// IfAny<typeof reactAct, reactDeprecatedAct, reactAct> from https://stackoverflow.com/a/61626123/3406963
export const act: 0 extends 1 & typeof reactAct
? typeof reactDeprecatedAct
: typeof reactAct