Skip to content

Commit

Permalink
Adds a test for installing a specific version of a dotnet tool
Browse files Browse the repository at this point in the history
  • Loading branch information
ecampidoglio committed Apr 26, 2024
1 parent f82f675 commit cd6cb39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions __tests__/dotnet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ describe('When successfully installing a local tool', () => {
await dotnet.installLocalTool('The.Tool', 'dotnet-tool', new ToolsDirectory(targetDirectory));
expect(fakeExec).toHaveBeenCalledWith('dotnet tool install', ['--tool-path', targetDirectory, 'The.Tool']);
});

test('it should install the specified version of the specified tool', async () => {
await dotnet.installLocalTool('The.Tool', 'dotnet-tool', undefined, 'theVersion');
expect(fakeExec).toHaveBeenCalledWith('dotnet tool install', ['--version', 'theVersion', '--tool-path', 'tools', 'The.Tool']);
});
});

describe('When installing a local tool in a directory where it already exists', () => {
Expand Down

0 comments on commit cd6cb39

Please sign in to comment.