docker-build-push/__tests__/docker.test.ts
CrazyMax 38b45804b5
Standalone mode support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-28 09:31:51 +02:00

16 lines
462 B
TypeScript

import {describe, expect, it, jest} from '@jest/globals';
import * as docker from '../src/docker';
import * as exec from '@actions/exec';
describe('isAvailable', () => {
it('cli', () => {
const execSpy = jest.spyOn(exec, 'getExecOutput');
docker.isAvailable();
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`docker`, undefined, {
silent: true,
ignoreReturnCode: true
});
});
});