Skip to content

Commit

Permalink
Skip warning msg for dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Pope committed Feb 20, 2024
1 parent 1176aed commit 6b5cc69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react-test-renderer/src/ReactTestRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,10 @@ function create(
unstable_flushSync: typeof flushSync,
} {
if (__DEV__) {
if (enableReactTestRendererWarning === true) {
if (
enableReactTestRendererWarning === true &&
global.__REACT_DEVTOOLS_GLOBAL_HOOK__ == null
) {
console.warn(
'react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer',
);
Expand Down

0 comments on commit 6b5cc69

Please sign in to comment.