Fix tests for React 19 (#45007)

Summary:
Qhile landing the changes for React19 in 0.75, we missed one test that needs to be updated

## Changelog:
[Internal] - Fix Jest tests in React 19

Pull Request resolved: https://github.com/facebook/react-native/pull/45007

Test Plan: CircleCI is green

Reviewed By: robhogan

Differential Revision: D58671824

Pulled By: cipolleschi

fbshipit-source-id: 48a72f5cdc4d03201cb1778915ed3519759cf017
This commit is contained in:
Riccardo Cipolleschi
2024-06-17 07:47:15 -07:00
committed by Facebook GitHub Bot
parent a6b862d427
commit 16380aa167
@@ -10,8 +10,10 @@ import App from '../App';
import {it} from '@jest/globals';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
import ReactTestRenderer from 'react-test-renderer';
it('renders correctly', () => {
renderer.create(<App />);
it('renders correctly', async () => {
await ReactTestRenderer.act(() => {
ReactTestRenderer.create(<App />);
});
});