Skip to content

Commit

Permalink
Tests are now covering the correct preview-format
Browse files Browse the repository at this point in the history
  • Loading branch information
litetex committed May 21, 2020
1 parent 994f136 commit a8eaac5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions __tests__/installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as installer from '../src/installer';
const IS_WINDOWS = process.platform === 'win32';

describe('version tests', () => {
each(['3.1.999', '3.1.101-preview']).test(
each(['3.1.999', '3.1.101-preview.3']).test(
"Exact version '%s' should be the same",
vers => {
let versInfo = new installer.DotNetVersionInfo(vers);
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('installer tests', () => {
}
}, 100000);

it('Resolving a exact version works', async () => {
it('Resolving a exact stable version works', async () => {
const dotnetInstaller = new installer.DotnetCoreInstaller('3.1.201');
let versInfo = await dotnetInstaller.resolveInfos(
['win-x64'],
Expand All @@ -118,6 +118,16 @@ describe('installer tests', () => {
expect(versInfo.resolvedVersion).toBe('3.1.201');
}, 100000);

it('Resolving a exact preview version works', async () => {
const dotnetInstaller = new installer.DotnetCoreInstaller('5.0.0-preview.4');
let versInfo = await dotnetInstaller.resolveInfos(
['win-x64'],
new installer.DotNetVersionInfo('5.0.0-preview.4')
);

expect(versInfo.resolvedVersion).toBe('5.0.0-preview.4');
}, 100000);

it('Acquires version of dotnet if no matching version is installed', async () => {
await getDotnet('2.2.205');
const dotnetDir = path.join(toolDir, 'dncs', '2.2.205', os.arch());
Expand Down

0 comments on commit a8eaac5

Please sign in to comment.