Skip to content

Instantly share code, notes, and snippets.

@vojty
Created December 21, 2017 15:45
Show Gist options
  • Save vojty/284600631dcdb6e57de3f54a22e911e2 to your computer and use it in GitHub Desktop.
Save vojty/284600631dcdb6e57de3f54a22e911e2 to your computer and use it in GitHub Desktop.
Enzyme 3.2 + React-portal
const portalComponent = wrapper.find(Portal).at(0);
const portalInstance = portalComponent.instance();
const portalWrapper = new ReactWrapper(portalInstance.props.children);
portalWrapper.find(...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment