Let's get rid of sinon and just use jest's built-in mock functions.
Also, we use jest.mock in a pretty sub-optimal way. We really shouldn't be doing jest.mock calls inside of functions. Those should go at the top of the module where we're calling it.
Also, doing inline jest.mock is not the best. We should probably write these mocks in __mocks__ directories (see the Jest docs).
Let's get rid of
sinon
and just use jest's built-in mock functions.Also, we use
jest.mock
in a pretty sub-optimal way. We really shouldn't be doingjest.mock
calls inside of functions. Those should go at the top of the module where we're calling it.Also, doing inline
jest.mock
is not the best. We should probably write these mocks in__mocks__
directories (see the Jest docs).