Tests: Clear API mocks between each test

This commit is contained in:
Alex Gleason
2020-06-09 17:16:22 -05:00
parent 842f35ebc5
commit f71f7e4dbd
3 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,7 @@ const api = jest.requireActual('../api').default;
let mocks = [];
export const __stub = func => mocks.push(func);
export const __clear = () => mocks = [];
const setupMock = axios => {
const mock = new MockAdapter(axios);