Remove hard dependency from installer

This commit is contained in:
Nikolai Laevskii
2023-09-08 15:21:18 +02:00
parent 3edc8ffab8
commit fd2f9a08fe
5 changed files with 245 additions and 235 deletions

View File

@ -51,7 +51,7 @@ describe('installer tests', () => {
});
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);
await expect(dotnetInstaller.installDotnet()).rejects.toThrow(
@ -73,7 +73,7 @@ describe('installer tests', () => {
maxSatisfyingSpy.mockImplementation(() => inputVersion);
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);
const installedVersion = await dotnetInstaller.installDotnet();
@ -96,7 +96,7 @@ describe('installer tests', () => {
maxSatisfyingSpy.mockImplementation(() => inputVersion);
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);
@ -133,7 +133,7 @@ describe('installer tests', () => {
maxSatisfyingSpy.mockImplementation(() => inputVersion);
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);
@ -159,7 +159,7 @@ describe('installer tests', () => {
maxSatisfyingSpy.mockImplementation(() => inputVersion);
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);
@ -186,7 +186,7 @@ describe('installer tests', () => {
maxSatisfyingSpy.mockImplementation(() => inputVersion);
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);
@ -226,7 +226,7 @@ describe('installer tests', () => {
maxSatisfyingSpy.mockImplementation(() => inputVersion);
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);
@ -267,7 +267,7 @@ describe('installer tests', () => {
maxSatisfyingSpy.mockImplementation(() => inputVersion);
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);
@ -305,7 +305,7 @@ describe('installer tests', () => {
maxSatisfyingSpy.mockImplementation(() => inputVersion);
const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion,
await (new installer.DotnetVersionResolver(inputVersion)).createDotnetVersion(),
inputQuality
);