mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 11:31:07 +07:00
More tests and more fixes
This commit is contained in:
parent
5411b6342a
commit
ebefd7bccb
@ -114,6 +114,14 @@ describe('installer tests', () => {
|
||||
}
|
||||
}, 100000);
|
||||
|
||||
it('Resolving a normal generic version works', async() => {
|
||||
const dotnetInstaller = new installer.DotnetCoreInstaller('3.1.x');
|
||||
let versInfo = await dotnetInstaller.resolveInfos(["win-x64"],new installer.DotNetVersionInfo("3.1.x"));
|
||||
|
||||
expect(versInfo.resolvedVersion.startsWith('3.1.'));
|
||||
}, 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());
|
||||
|
@ -285,8 +285,7 @@ export class DotnetCoreInstaller {
|
||||
|
||||
// Exclude versions that are newer than the latest if using not exact
|
||||
if(!versionInfo.isExactVersion()) {
|
||||
|
||||
let latestSdk : string = releasesResponse['latest-sdk'];
|
||||
let latestSdk : string = releasesResult['latest-sdk'];
|
||||
|
||||
releasesInfo = releasesInfo.filter((releaseInfo: any) => semver.lte(releaseInfo['sdk']['version'], latestSdk));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user