Created
February 21, 2018 13:15
-
-
Save apieceofbart/d28690d52c46848c39d904ce8968bb27 to your computer and use it in GitHub Desktop.
mock lodash debounce in jest
This file contains hidden or 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
// somewhere on top | |
import _ from 'lodash'; | |
jest.unmock('lodash'); | |
// then | |
_.debounce = jest.fn((fn) => fn); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked for me perfectly: