Created
May 13, 2019 18:08
-
-
Save dangreenisrael/65413e98a75b168db24ecb74b4aaf127 to your computer and use it in GitHub Desktop.
clear all mocks
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
const clearAll = obj => { | |
const clearMock = member => { | |
member.mockClear && member.mockClear() | |
} | |
Object.keys(obj).forEach(key => clearMock(obj[key])); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment