Skip to content

Commit

Permalink
Also link warning page to make it cohesive
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 27, 2024
1 parent 32549cf commit d8733fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/react-dom/src/__tests__/ReactTestUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ describe('ReactTestUtils', () => {
}).toErrorDev(
[
'`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. ' +
'Import `act` from `react` instead of `react-dom/test-utils`.',
'Import `act` from `react` instead of `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-dom-test-utils for more info.',
],
{withoutStack: true},
);
Expand Down
3 changes: 2 additions & 1 deletion packages/react-dom/src/test-utils/ReactTestUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ function act(callback) {
didWarnAboutUsingAct = true;
console.error(
'`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. ' +
'Import `act` from `react` instead of `react-dom/test-utils`.',
'Import `act` from `react` instead of `react-dom/test-utils`. ' +
'See https://react.dev/warnings/react-dom-test-utils for more info.',
);
}
return React.act(callback);
Expand Down

0 comments on commit d8733fa

Please sign in to comment.