Skip to content

Instantly share code, notes, and snippets.

@dangreenisrael
Created May 13, 2019 18:08
Show Gist options
  • Save dangreenisrael/65413e98a75b168db24ecb74b4aaf127 to your computer and use it in GitHub Desktop.
Save dangreenisrael/65413e98a75b168db24ecb74b4aaf127 to your computer and use it in GitHub Desktop.
clear all mocks
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