favor afterEach for mock-fs

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-12-20 15:09:41 +01:00
parent edfc373b9b
commit 2d33cd4dc0
10 changed files with 19 additions and 56 deletions
@@ -22,7 +22,7 @@ import { movePlugin } from './createPlugin';
const id = 'testPluginMock';
describe('createPlugin', () => {
afterAll(() => {
afterEach(() => {
mockFs.restore();
});
@@ -122,10 +122,12 @@ describe('bump', () => {
},
}));
});
afterEach(() => {
mockFs.restore();
jest.resetAllMocks();
});
const worker = setupServer();
setupRequestMockHandlers(worker);