docker: info method

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-01-23 10:39:14 +01:00
parent aae4a2d7bc
commit 595e2417e8
2 changed files with 31 additions and 0 deletions

View File

@@ -15,3 +15,20 @@ describe('isAvailable', () => {
});
});
});
describe('info', () => {
it('standard', () => {
const execSpy = jest.spyOn(exec, 'exec');
Docker.info();
expect(execSpy).toHaveBeenCalledWith(`docker`, ['version'], {
failOnStdErr: false
});
});
it('standalone', () => {
const execSpy = jest.spyOn(exec, 'exec');
Docker.info(true);
expect(execSpy).not.toHaveBeenCalledWith(`docker`, ['version'], {
failOnStdErr: false
});
});
});