test: fix tests

This commit is contained in:
Simon BRICHE 2025-11-18 15:31:09 +01:00
parent b84c202d74
commit 24d38ec410

View File

@ -1,7 +1,7 @@
import * as core from '@actions/core';
import * as cache from '@actions/cache';
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';
describe('run', () => {
@ -21,6 +21,7 @@ describe('run', () => {
let saveStateSpy: jest.SpyInstance;
let getStateSpy: jest.SpyInstance;
let getInputSpy: jest.SpyInstance;
let getBooleanInputSpy: jest.SpyInstance;
let setFailedSpy: jest.SpyInstance;
// cache spy
@ -59,6 +60,9 @@ describe('run', () => {
getInputSpy = jest.spyOn(core, 'getInput');
getInputSpy.mockImplementation(input => inputs[input]);
getBooleanInputSpy = jest.spyOn(core, 'getBooleanInput');
getBooleanInputSpy.mockImplementation(input => inputs[input]);
getExecOutputSpy = jest.spyOn(exec, 'getExecOutput');
getExecOutputSpy.mockImplementation((input: string) => {
if (input.includes('pip')) {