Standalone mode support

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-04-28 09:31:47 +02:00
parent ba317382dc
commit 38b45804b5
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
10 changed files with 152 additions and 31 deletions

16
__tests__/docker.test.ts Normal file
View file

@ -0,0 +1,16 @@
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
});
});
});