How to use the enzyme-adapter-utils.createRenderWrapper function in enzyme-adapter-utils

To help you get started, we’ve selected a few enzyme-adapter-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github drcmda / react-contextual / tests / jest.react.16.adapter.js View on Github external
render(el, context) {
        if (
          options.context &&
          (el.type.contextTypes || options.childContextTypes)
        ) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          }
          const ContextWrapper = createRenderWrapper(
            el,
            context,
            childContextTypes
          )
          return ReactDOMServer.renderToStaticMarkup(
            React.createElement(ContextWrapper)
          )
        }
        return ReactDOMServer.renderToStaticMarkup(el)
      },
    }
github unsplash / react-progressive-enhancement / tests / ReactSixteenAdapter.js View on Github external
render(el, context) {
        if (
          options.context &&
          (el.type.contextTypes || options.childContextTypes)
        ) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          };
          const ContextWrapper = createRenderWrapper(
            el,
            context,
            childContextTypes,
          );
          return ReactDOMServer.renderToStaticMarkup(
            React.createElement(ContextWrapper),
          );
        }
        return ReactDOMServer.renderToStaticMarkup(el);
      },
    };
github airbnb / enzyme / packages / enzyme-adapter-react-13 / src / ReactThirteenAdapter.js View on Github external
render(el, context) {
        if (options.context && (el.type.contextTypes || options.childContextTypes)) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          };
          const ContextWrapper = createRenderWrapper(el, context, childContextTypes);
          return React.renderToStaticMarkup(React.createElement(ContextWrapper));
        }
        return React.renderToStaticMarkup(el);
      },
    };
github zerobias / effector / src / fixtures / ReactSixteenAdapter.js View on Github external
render(el, context) {
        if (
          options.context &&
          (el.type.contextTypes || options.childContextTypes)
        ) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          }
          const ContextWrapper = createRenderWrapper(
            el,
            context,
            childContextTypes,
          )
          return ReactDOMServer.renderToStaticMarkup(
            React.createElement(ContextWrapper),
          )
        }
        return ReactDOMServer.renderToStaticMarkup(el)
      },
    }
github airbnb / enzyme / packages / enzyme-adapter-react-16.3 / src / ReactSixteenThreeAdapter.js View on Github external
render(el, context) {
        if (options.context && (el.type.contextTypes || options.childContextTypes)) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          };
          const ContextWrapper = createRenderWrapper(el, context, childContextTypes);
          return ReactDOMServer.renderToStaticMarkup(React.createElement(ContextWrapper));
        }
        return ReactDOMServer.renderToStaticMarkup(el);
      },
    };
github airbnb / enzyme / packages / enzyme-adapter-react-15 / src / ReactFifteenAdapter.js View on Github external
render(el, context) {
        if (options.context && (el.type.contextTypes || options.childContextTypes)) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          };
          const ContextWrapper = createRenderWrapper(el, context, childContextTypes);
          return ReactDOMServer.renderToStaticMarkup(React.createElement(ContextWrapper));
        }
        return ReactDOMServer.renderToStaticMarkup(el);
      },
    };
github btford / react-palm / src / enzyme-adapter-react-16 / index.js View on Github external
render(el, context) {
        if (
          options.context &&
          (el.type.contextTypes || options.childContextTypes)
        ) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes
          };
          const ContextWrapper = createRenderWrapper(
            el,
            context,
            childContextTypes
          );
          return ReactDOMServer.renderToStaticMarkup(
            React.createElement(ContextWrapper)
          );
        }
        return ReactDOMServer.renderToStaticMarkup(el);
      }
    };
github airbnb / enzyme / packages / enzyme-adapter-react-13 / src / ReactThirteenAdapter.js View on Github external
render(el, context) {
        if (options.context && (el.type.contextTypes || options.childContextTypes)) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          };
          const ContextWrapper = createRenderWrapper(el, context, childContextTypes);
          return React.renderToStaticMarkup(React.createElement(ContextWrapper));
        }
        return React.renderToStaticMarkup(el);
      },
    };
github airbnb / enzyme / packages / enzyme-adapter-react-14 / src / ReactFourteenAdapter.js View on Github external
render(el, context) {
        if (options.context && (el.type.contextTypes || options.childContextTypes)) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          };
          const ContextWrapper = createRenderWrapper(el, context, childContextTypes);
          return ReactDOMServer.renderToStaticMarkup(React.createElement(ContextWrapper));
        }
        return ReactDOMServer.renderToStaticMarkup(el);
      },
    };
github airbnb / enzyme / packages / enzyme-adapter-react-16 / src / ReactSixteenAdapter.js View on Github external
render(el, context) {
        if (options.context && (el.type.contextTypes || options.childContextTypes)) {
          const childContextTypes = {
            ...(el.type.contextTypes || {}),
            ...options.childContextTypes,
          };
          const ContextWrapper = createRenderWrapper(el, context, childContextTypes);
          return ReactDOMServer.renderToStaticMarkup(React.createElement(ContextWrapper));
        }
        return ReactDOMServer.renderToStaticMarkup(el);
      },
    };