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.0
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: 1645d21950ab8e3c6740b7e51b8a179a4c975c24
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 11, 2024

  1. fix: Stop using nullish coalescing (#1299)

    eps1lon authored Apr 11, 2024
    Copy the full SHA
    1645d21 View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/act-compat.js
3 changes: 2 additions & 1 deletion src/act-compat.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react'
import * as DeprecatedReactTestUtils from 'react-dom/test-utils'

const reactAct = React.act ?? DeprecatedReactTestUtils.act
const reactAct =
typeof React.act === 'function' ? React.act : DeprecatedReactTestUtils.act

function getGlobalThis() {
/* istanbul ignore else */