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());