|
|
@ -34,10 +34,14 @@ describe('setup-go', () => {
|
|
|
|
let mkdirpSpy: jest.SpyInstance;
|
|
|
|
let mkdirpSpy: jest.SpyInstance;
|
|
|
|
let execSpy: jest.SpyInstance;
|
|
|
|
let execSpy: jest.SpyInstance;
|
|
|
|
let getManifestSpy: jest.SpyInstance;
|
|
|
|
let getManifestSpy: jest.SpyInstance;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
beforeAll(() => {
|
|
|
|
|
|
|
|
process.env['GITHUB_PATH'] = ''; // Stub out ENV file functionality so we can verify it writes to standard out
|
|
|
|
|
|
|
|
console.log("::stop-commands::stoptoken"); // Disable executing of runner commands when running tests in actions
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
beforeEach(() => {
|
|
|
|
// @actions/core
|
|
|
|
// @actions/core
|
|
|
|
process.env['GITHUB_PATH'] = ''; // Stub out ENV file functionality so we can verify it writes to standard out
|
|
|
|
|
|
|
|
inputs = {};
|
|
|
|
inputs = {};
|
|
|
|
inSpy = jest.spyOn(core, 'getInput');
|
|
|
|
inSpy = jest.spyOn(core, 'getInput');
|
|
|
|
inSpy.mockImplementation(name => inputs[name]);
|
|
|
|
inSpy.mockImplementation(name => inputs[name]);
|
|
|
@ -91,7 +95,9 @@ describe('setup-go', () => {
|
|
|
|
//jest.restoreAllMocks();
|
|
|
|
//jest.restoreAllMocks();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
afterAll(async () => {}, 100000);
|
|
|
|
afterAll(async () => {
|
|
|
|
|
|
|
|
console.log("::stoptoken::"); // Re-enable executing of runner commands when running tests in actions
|
|
|
|
|
|
|
|
}, 100000);
|
|
|
|
|
|
|
|
|
|
|
|
it('can find 1.9.7 from manifest on osx', async () => {
|
|
|
|
it('can find 1.9.7 from manifest on osx', async () => {
|
|
|
|
os.platform = 'darwin';
|
|
|
|
os.platform = 'darwin';
|
|
|
|