code: function getReact (node, fn) {
          /*eslint-disable no-unused-vars*/
          const componentInstance = getComponentForDOMNode(node);
  
          if (!componentInstance) return null;
  
          delete window['%testCafeReactSelector%'];
          delete window['%testCafeReactEmptyComponent%'];
          delete window['%testCafeReactFoundComponents%'];
  
          if (typeof fn === 'function') {
              return fn({
                  state: copyReactObject(componentInstance.state),
                  props: copyReactObject(componentInstance.props),
                  key:   componentInstance.key
              });
          }
  
          return {
              state: copyReactObject(componentInstance.state),
              props: copyReactObject(componentInstance.props),
              key:   componentInstance.key
          };
      }
docs: /*eslint-enable no-unused-vars