mount<T extends Component> function

TestJacket<T> mount<T extends Component>(
  1. ReactElement reactElement, {
  2. Element? mountNode,
  3. bool attachedToDocument = false,
  4. bool autoTearDown = true,
})

Renders reactElement, and returns a TestJacket instance to use in a test.

Will render into mountNode if provided.

To render into a node attached to document.body, as opposed to a detached node, set attachedToDocument to true.

To have the instance not automatically unmounted when the test if over set autoTearDown to false.

Implementation

TestJacket<T> mount<T extends react.Component>(over_react.ReactElement reactElement, {
    Element? mountNode,
    bool attachedToDocument = false,
    bool autoTearDown = true
}) {
  return TestJacket<T>._(reactElement,
      mountNode: mountNode,
      attachedToDocument: attachedToDocument,
      autoTearDown: autoTearDown
  );
}