mirror of
https://github.com/actions/setup-go.git
synced 2025-06-29 12:43:45 +00:00
Apply PR suggestions
This commit is contained in:
parent
5552b45f54
commit
317adaa2cb
5 changed files with 120 additions and 75 deletions
|
@ -41,6 +41,7 @@ describe('setup-go', () => {
|
|||
let mkdirpSpy: jest.SpyInstance;
|
||||
let execSpy: jest.SpyInstance;
|
||||
let getManifestSpy: jest.SpyInstance;
|
||||
let getAllVersionsSpy: jest.SpyInstance;
|
||||
|
||||
beforeAll(async () => {
|
||||
process.env['GITHUB_ENV'] = ''; // Stub out Environment file functionality so we can verify it writes to standard out (toolkit is backwards compatible)
|
||||
|
@ -83,6 +84,7 @@ describe('setup-go', () => {
|
|||
cacheSpy = jest.spyOn(tc, 'cacheDir');
|
||||
getSpy = jest.spyOn(im, 'getVersionsDist');
|
||||
getManifestSpy = jest.spyOn(tc, 'getManifestFromRepo');
|
||||
getAllVersionsSpy = jest.spyOn(im, 'getAllReleases');
|
||||
|
||||
// io
|
||||
whichSpy = jest.spyOn(io, 'which');
|
||||
|
@ -779,6 +781,7 @@ describe('setup-go', () => {
|
|||
getManifestSpy.mockImplementation(() => {
|
||||
throw new Error('Unable to download manifest');
|
||||
});
|
||||
getAllVersionsSpy.mockImplementationOnce(() => undefined);
|
||||
|
||||
dlSpy.mockImplementation(async () => '/some/temp/path');
|
||||
let toolPath = path.normalize('/cache/go/1.13.7/x64');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue