Skip to content

Instantly share code, notes, and snippets.

@alirezamirian
Last active February 22, 2019 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alirezamirian/043f737c5559e4a01e1b1714fe369904 to your computer and use it in GitHub Desktop.
Save alirezamirian/043f737c5559e4a01e1b1714fe369904 to your computer and use it in GitHub Desktop.
For a Medium post
function mountUsage(usage = <Zippy header='header'/>) {
const wrapper = mount(usage);
return {
wrapper,
isOpen: () => wrapper.find('.zippy-content').length > 0,
clickHeader: () => wrapper.find('.zippy-header').simulate('click'),
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment