More tests

This commit is contained in:
litetex 2020-04-04 19:44:50 +02:00
parent ebefd7bccb
commit 3426e11858

View File

@ -116,11 +116,27 @@ describe('installer tests', () => {
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"));
let versInfo = await dotnetInstaller.resolveInfos(["win-x64"],new installer.DotNetVersionInfo('3.1.x'));
expect(versInfo.resolvedVersion.startsWith('3.1.'));
}, 100000);
it('Resolving a nonexistent generic version fails', async() => {
const dotnetInstaller = new installer.DotnetCoreInstaller('999.1.x');
try{
await dotnetInstaller.resolveInfos(["win-x64"],new installer.DotNetVersionInfo('999.1.x'));
fail();
} catch {
expect(true);
}
}, 100000);
it('Resolving a exact version works', async() => {
const dotnetInstaller = new installer.DotnetCoreInstaller('3.1.201');
let versInfo = await dotnetInstaller.resolveInfos(["win-x64"],new installer.DotNetVersionInfo('3.1.201'));
expect(versInfo.resolvedVersion).toBe('3.1.201');
}, 100000);
it('Acquires version of dotnet if no matching version is installed', async () => {
await getDotnet('2.2.205');