mirror of
https://github.com/docker/login-action.git
synced 2025-04-19 01:26:45 +00:00
update to node 16
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
6af3c118c8
commit
4b59a429db
17 changed files with 2541 additions and 56040 deletions
|
@ -1,20 +1,19 @@
|
|||
import {expect, jest, test} from '@jest/globals';
|
||||
import {loginStandard, logout} from '../src/docker';
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
import * as exec from '@actions/exec';
|
||||
|
||||
process.env['RUNNER_TEMP'] = path.join(__dirname, 'runner');
|
||||
|
||||
test('loginStandard calls exec', async () => {
|
||||
const execSpy: jest.SpyInstance = jest.spyOn(exec, 'getExecOutput');
|
||||
execSpy.mockImplementation(() =>
|
||||
Promise.resolve({
|
||||
// @ts-ignore
|
||||
const execSpy = jest.spyOn(exec, 'getExecOutput').mockImplementation(async () => {
|
||||
return {
|
||||
exitCode: expect.any(Number),
|
||||
stdout: expect.any(Function),
|
||||
stderr: expect.any(Function)
|
||||
})
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
const username: string = 'dbowie';
|
||||
const password: string = 'groundcontrol';
|
||||
|
@ -30,14 +29,14 @@ test('loginStandard calls exec', async () => {
|
|||
});
|
||||
|
||||
test('logout calls exec', async () => {
|
||||
const execSpy: jest.SpyInstance = jest.spyOn(exec, 'getExecOutput');
|
||||
execSpy.mockImplementation(() =>
|
||||
Promise.resolve({
|
||||
// @ts-ignore
|
||||
const execSpy = jest.spyOn(exec, 'getExecOutput').mockImplementation(async () => {
|
||||
return {
|
||||
exitCode: expect.any(Number),
|
||||
stdout: expect.any(Function),
|
||||
stderr: expect.any(Function)
|
||||
})
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
const registry: string = 'https://ghcr.io';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue