mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 18:06:45 +00:00
Add validation for post step (#3)
* work on fixing cache post step * fix tests
This commit is contained in:
parent
5f3f74c689
commit
53f73ba16b
6 changed files with 31 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
import { run as cleanup } from '../src/cleanup-java';
|
||||
import * as core from '@actions/core';
|
||||
import * as cache from '@actions/cache';
|
||||
import * as util from '../src/util';
|
||||
|
||||
describe('cleanup', () => {
|
||||
let spyWarning: jest.SpyInstance<void, Parameters<typeof core.warning>>;
|
||||
|
@ -8,10 +9,13 @@ describe('cleanup', () => {
|
|||
ReturnType<typeof cache.saveCache>,
|
||||
Parameters<typeof cache.saveCache>
|
||||
>;
|
||||
let spyJobStatusSuccess: jest.SpyInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
spyWarning = jest.spyOn(core, 'warning');
|
||||
spyCacheSave = jest.spyOn(cache, 'saveCache');
|
||||
spyJobStatusSuccess = jest.spyOn(util, 'isJobStatusSuccess');
|
||||
spyJobStatusSuccess.mockReturnValue(true);
|
||||
createStateForSuccessfulRestore();
|
||||
});
|
||||
afterEach(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue