diff --git a/app/soapbox/__mocks__/api.js b/app/soapbox/__mocks__/api.js index b59b546ab..839cbfa70 100644 --- a/app/soapbox/__mocks__/api.js +++ b/app/soapbox/__mocks__/api.js @@ -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); diff --git a/app/soapbox/actions/__tests__/about-test.js b/app/soapbox/actions/__tests__/about-test.js index a07dc2fda..c0caf5e2c 100644 --- a/app/soapbox/actions/__tests__/about-test.js +++ b/app/soapbox/actions/__tests__/about-test.js @@ -12,7 +12,7 @@ const middlewares = [thunk]; const mockStore = configureMockStore(middlewares); describe('fetchAboutPage()', () => { - beforeAll(() => stubApi(mock => { + beforeEach(() => stubApi(mock => { mock.onGet('/instance/about/index.html').reply(200, '