withModal = function(props, children, test = noop) {
  return withElementCollector(() => {
    const node = createHTMLElement();
    const modalProps = { ariaHideApp: false, ...props };
    let modal;
    try {
      ReactDOM.render(
        <Modal ref={m => (modal = m)} {...modalProps}>
          {children}
        </Modal>,
        node
      );
      test(modal);
    } finally {
      ReactDOM.unmountComponentAtNode(node);
    }
  });
}
Request a managed modal to run the tests on.