From a953f385963f6c122ef8baeae01a0b6752dfa098 Mon Sep 17 00:00:00 2001 From: Webber Date: Sun, 27 Mar 2022 01:16:00 +0100 Subject: [PATCH] fix: test aftereach --- src/model/system.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/system.test.ts b/src/model/system.test.ts index 05c2dace..2d2c2b84 100644 --- a/src/model/system.test.ts +++ b/src/model/system.test.ts @@ -8,11 +8,11 @@ jest.spyOn(core, 'warning').mockImplementation(() => {}); jest.spyOn(core, 'error').mockImplementation(() => {}); const execSpy = jest.spyOn(exec, 'exec').mockImplementation(async () => 0); +afterEach(() => jest.clearAllMocks()); + describe('System', () => { describe('run', () => { describe('units', () => { - beforeEach(() => jest.clearAllMocks()); - it('passes the command to command line', async () => { await expect(System.run('echo test')).resolves.not.toBeNull(); await expect(execSpy).toHaveBeenLastCalledWith('echo test', expect.anything(), expect.anything());