Created
January 31, 2018 16:46
-
-
Save debugwand/95f2ad1083d4574afcbbe3de05b12002 to your computer and use it in GitHub Desktop.
jest - mock a module and return one of its parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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