Skip to content

Instantly share code, notes, and snippets.

@debugwand
Created January 31, 2018 16:46
Show Gist options
  • Save debugwand/95f2ad1083d4574afcbbe3de05b12002 to your computer and use it in GitHub Desktop.
Save debugwand/95f2ad1083d4574afcbbe3de05b12002 to your computer and use it in GitHub Desktop.
jest - mock a module and return one of its parameters
jest.mock('../mymodule', () => {
return (opts => { return opts.somecallback; });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment