Skip to content

Commit

Permalink
Gate import since it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Feb 9, 2022
1 parent 073eea3 commit 157cab1
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions packages/react-dom/src/__tests__/ReactDOMTestSelectors-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,23 @@ describe('ReactDOMTestSelectors', () => {
jest.resetModules();

React = require('react');

const ReactDOM = require('react-dom/unstable_testing');
act = React.unstable_act;
createComponentSelector = ReactDOM.createComponentSelector;
createHasPseudoClassSelector = ReactDOM.createHasPseudoClassSelector;
createRoleSelector = ReactDOM.createRoleSelector;
createTextSelector = ReactDOM.createTextSelector;
createTestNameSelector = ReactDOM.createTestNameSelector;
findAllNodes = ReactDOM.findAllNodes;
findBoundingRects = ReactDOM.findBoundingRects;
focusWithin = ReactDOM.focusWithin;
getFindAllNodesFailureDescription =
ReactDOM.getFindAllNodesFailureDescription;
observeVisibleRects = ReactDOM.observeVisibleRects;
render = ReactDOM.render;

if (__EXPERIMENTAL__ || global.__WWW__) {
const ReactDOM = require('react-dom/unstable_testing');
createComponentSelector = ReactDOM.createComponentSelector;
createHasPseudoClassSelector = ReactDOM.createHasPseudoClassSelector;
createRoleSelector = ReactDOM.createRoleSelector;
createTextSelector = ReactDOM.createTextSelector;
createTestNameSelector = ReactDOM.createTestNameSelector;
findAllNodes = ReactDOM.findAllNodes;
findBoundingRects = ReactDOM.findBoundingRects;
focusWithin = ReactDOM.focusWithin;
getFindAllNodesFailureDescription =
ReactDOM.getFindAllNodesFailureDescription;
observeVisibleRects = ReactDOM.observeVisibleRects;
render = ReactDOM.render;
}

container = document.createElement('div');
document.body.appendChild(container);
Expand Down

0 comments on commit 157cab1

Please sign in to comment.