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 Mar 12, 2019
1 parent 61550a3 commit d0c9719
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 @@ -180,6 +180,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 d0c9719

Please sign in to comment.