mirror of
https://github.com/actions/setup-go.git
synced 2025-06-29 20:53:43 +00:00
improve tests
This commit is contained in:
parent
8998c6804e
commit
42a70ecdee
3 changed files with 72 additions and 36 deletions
|
@ -11,12 +11,13 @@ import * as im from '../src/installer';
|
|||
import goJsonData from './data/golang-dl.json';
|
||||
import matchers from '../matchers.json';
|
||||
import goTestManifest from './data/versions-manifest.json';
|
||||
import {addExecutablesToCache, IGoVersionInfo} from '../src/installer';
|
||||
const matcherPattern = matchers.problemMatcher[0].pattern[0];
|
||||
const matcherRegExp = new RegExp(matcherPattern.regexp);
|
||||
const win32Join = path.win32.join;
|
||||
const posixJoin = path.posix.join;
|
||||
|
||||
jest.setTimeout(10000);
|
||||
|
||||
describe('setup-go', () => {
|
||||
let inputs = {} as any;
|
||||
let os = {} as any;
|
||||
|
|
|
@ -43,6 +43,9 @@ describe('Windows performance workaround', () => {
|
|||
jest.clearAllMocks();
|
||||
process.env['RUNNER_TOOL_CACHE'] = runnerToolCache;
|
||||
});
|
||||
// addExecutablesToCache uses 3rd party dependency toolkit.cache under the hood
|
||||
// that currently is implemented with RUNNER_TOOL_CACHE environment variable
|
||||
// Make sure the implementation has not been changed
|
||||
it('addExecutablesToCache should depend on env[RUNNER_TOOL_CACHE]', async () => {
|
||||
const info: IGoVersionInfo = {
|
||||
type: 'dist',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue