mirror of
https://github.com/actions/setup-python.git
synced 2025-12-11 07:05:21 +00:00
test: fix tests
This commit is contained in:
parent
b84c202d74
commit
24d38ec410
@ -1,7 +1,7 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as cache from '@actions/cache';
|
import * as cache from '@actions/cache';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
import {run} from '../src/cache-save';
|
import {run} from '../src/post-python';
|
||||||
import {State} from '../src/cache-distributions/cache-distributor';
|
import {State} from '../src/cache-distributions/cache-distributor';
|
||||||
|
|
||||||
describe('run', () => {
|
describe('run', () => {
|
||||||
@ -21,6 +21,7 @@ describe('run', () => {
|
|||||||
let saveStateSpy: jest.SpyInstance;
|
let saveStateSpy: jest.SpyInstance;
|
||||||
let getStateSpy: jest.SpyInstance;
|
let getStateSpy: jest.SpyInstance;
|
||||||
let getInputSpy: jest.SpyInstance;
|
let getInputSpy: jest.SpyInstance;
|
||||||
|
let getBooleanInputSpy: jest.SpyInstance;
|
||||||
let setFailedSpy: jest.SpyInstance;
|
let setFailedSpy: jest.SpyInstance;
|
||||||
|
|
||||||
// cache spy
|
// cache spy
|
||||||
@ -59,6 +60,9 @@ describe('run', () => {
|
|||||||
getInputSpy = jest.spyOn(core, 'getInput');
|
getInputSpy = jest.spyOn(core, 'getInput');
|
||||||
getInputSpy.mockImplementation(input => inputs[input]);
|
getInputSpy.mockImplementation(input => inputs[input]);
|
||||||
|
|
||||||
|
getBooleanInputSpy = jest.spyOn(core, 'getBooleanInput');
|
||||||
|
getBooleanInputSpy.mockImplementation(input => inputs[input]);
|
||||||
|
|
||||||
getExecOutputSpy = jest.spyOn(exec, 'getExecOutput');
|
getExecOutputSpy = jest.spyOn(exec, 'getExecOutput');
|
||||||
getExecOutputSpy.mockImplementation((input: string) => {
|
getExecOutputSpy.mockImplementation((input: string) => {
|
||||||
if (input.includes('pip')) {
|
if (input.includes('pip')) {
|
||||||
Loading…
x
Reference in New Issue
Block a user