Last active
February 12, 2021 05:11
-
-
Save ManuViola77/00899b450baebb8ef676c69a31af1b67 to your computer and use it in GitHub Desktop.
Complex Image Picker Mock
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
export default { | |
openPicker: jest | |
.fn(() => Promise.resolve(result)) // default implementation | |
.mockImplementationOnce(() => Promise.reject(result)) // first time is called | |
.mockImplementationOnce(() => Promise.resolve(result)), // second time is called | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you share complete example of this.