MetaMask / snaps-cli

A CLI for developing MetaMask plugins.
ISC License
37 stars 26 forks source link

Adds clearallmocks to util function tests #99

Closed astarinmymind closed 3 years ago

rekmarks commented 3 years ago

Ah, I see that clearAllMocks clears module mocks created using jest.mock(...), while restoreAllMocks do nothing for them. This is a good change, but we should only call clearAllMocks where strictly necessary, which as far as I can tell includes readline.test.js and snap-config.test.js.

rekmarks commented 3 years ago

We're gonna clear mocks globally via the Jest config.