Skip to content

Commit a8eaac5

Browse files
committed
Tests are now covering the correct preview-format
1 parent 994f136 commit a8eaac5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

__tests__/installer.test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import * as installer from '../src/installer';
1616
const IS_WINDOWS = process.platform === 'win32';
1717

1818
describe('version tests', () => {
19-
each(['3.1.999', '3.1.101-preview']).test(
19+
each(['3.1.999', '3.1.101-preview.3']).test(
2020
"Exact version '%s' should be the same",
2121
vers => {
2222
let versInfo = new installer.DotNetVersionInfo(vers);
@@ -108,7 +108,7 @@ describe('installer tests', () => {
108108
}
109109
}, 100000);
110110

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

121+
it('Resolving a exact preview version works', async () => {
122+
const dotnetInstaller = new installer.DotnetCoreInstaller('5.0.0-preview.4');
123+
let versInfo = await dotnetInstaller.resolveInfos(
124+
['win-x64'],
125+
new installer.DotNetVersionInfo('5.0.0-preview.4')
126+
);
127+
128+
expect(versInfo.resolvedVersion).toBe('5.0.0-preview.4');
129+
}, 100000);
130+
121131
it('Acquires version of dotnet if no matching version is installed', async () => {
122132
await getDotnet('2.2.205');
123133
const dotnetDir = path.join(toolDir, 'dncs', '2.2.205', os.arch());

0 commit comments

Comments
 (0)