mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
Tests are now covering the correct preview-format
This commit is contained in:
parent
994f136361
commit
a8eaac54ab
@ -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);
|
||||
@ -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'],
|
||||
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user