fix: test aftereach

pull/357/head
Webber 2022-03-27 01:16:00 +01:00
parent a5a2e507cd
commit a953f38596
1 changed files with 2 additions and 2 deletions

View File

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