Skip to content

Commit

Permalink
Don't expect outside of dev
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jan 26, 2020
1 parent 889e005 commit 041b47e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react-dom/src/__tests__/findDOMNode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ describe('findDOMNode', () => {
</StrictMode>,
);

expect(() => ReactDOM.findDOMNode(child)).not.toWarnDev(['**']);
// outside of dev toWarnDev would always pass which means negating it would always fail
if (__DEV__) {
expect(() => ReactDOM.findDOMNode(child)).not.toWarnDev(['**']);
}
});
});

0 comments on commit 041b47e

Please sign in to comment.