Skip to content

Commit

Permalink
clean tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-shibanov committed Feb 22, 2022
1 parent e9b9e75 commit 65e68f5
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions __tests__/setup-go.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,29 +207,6 @@ describe('setup-go', () => {
expect(fileName).toBe('go1.14rc1.linux-amd64.tar.gz');
});

it('evaluates to stable with input as true', async () => {
inputs['go-version'] = '1.13.0';
inputs.stable = 'true';

let toolPath = path.normalize('/cache/go/1.13.0/x64');
findSpy.mockImplementation(() => toolPath);
await main.run();

expect(logSpy).toHaveBeenCalledWith(`Setup go stable version spec 1.13.0`);
});

it('evaluates to stable with no input', async () => {
inputs['go-version'] = '1.13.0';

inSpy.mockImplementation(name => inputs[name]);

let toolPath = path.normalize('/cache/go/1.13.0/x64');
findSpy.mockImplementation(() => toolPath);
await main.run();

expect(logSpy).toHaveBeenCalledWith(`Setup go stable version spec 1.13.0`);
});

it('finds a version of go already in the cache', async () => {
inputs['go-version'] = '1.13.0';

Expand Down Expand Up @@ -393,7 +370,6 @@ describe('setup-go', () => {
await main.run();

let expPath = path.join(toolPath, 'bin');
expect(logSpy).toHaveBeenCalledWith('Setup go stable version spec 1.12.14');
expect(findSpy).toHaveBeenCalled();
expect(logSpy).toHaveBeenCalledWith('Attempting to download 1.12.14...');
expect(dlSpy).toHaveBeenCalled();
Expand Down Expand Up @@ -605,7 +581,6 @@ describe('setup-go', () => {

await main.run();

expect(logSpy).toHaveBeenCalledWith('Setup go stable version spec 1.16');
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
});

Expand All @@ -629,9 +604,6 @@ describe('setup-go', () => {

await main.run();

expect(logSpy).toHaveBeenCalledWith(
`Setup go stable version spec ${versionSpec}`
);
expect(logSpy).toHaveBeenCalledWith(
'Attempting to resolve the latest version from the manifest...'
);
Expand Down

0 comments on commit 65e68f5

Please sign in to comment.