From f98011b96d68f57130f8df248a9830239f34aaf2 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 2 Jan 2024 15:58:04 -0800 Subject: [PATCH] Respond to linter --- .../src/test/unit/DotnetCoreAcquisitionWorker.test.ts | 5 +++-- vscode-dotnet-runtime-library/src/test/unit/TestUtility.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/vscode-dotnet-runtime-library/src/test/unit/DotnetCoreAcquisitionWorker.test.ts b/vscode-dotnet-runtime-library/src/test/unit/DotnetCoreAcquisitionWorker.test.ts index 2630b69f..74e98411 100644 --- a/vscode-dotnet-runtime-library/src/test/unit/DotnetCoreAcquisitionWorker.test.ts +++ b/vscode-dotnet-runtime-library/src/test/unit/DotnetCoreAcquisitionWorker.test.ts @@ -39,7 +39,8 @@ suite('DotnetCoreAcquisitionWorker Unit Tests', function () { const installedVersionsKey = 'installed'; const dotnetFolderName = `.dotnet O'Hare O'Donald`; - function setupWorker(isRuntimeWorker : boolean, version : string, arch? : string | null, existingEventSteam? : MockEventStream, existingContext? : MockExtensionContext): [MockDotnetCoreAcquisitionWorker, MockEventStream, MockExtensionContext, IAcquisitionInvoker] { + function setupWorker(isRuntimeWorker : boolean, version : string, arch? : string | null): [MockDotnetCoreAcquisitionWorker, MockEventStream, MockExtensionContext, IAcquisitionInvoker] + { const context = new MockExtensionContext(); const eventStream = new MockEventStream(); const acquisitionWorker = getMockAcquisitionWorker(isRuntimeWorker, version, arch, eventStream, context); @@ -213,7 +214,7 @@ suite('DotnetCoreAcquisitionWorker Unit Tests', function () { test('Graveyard Removes Failed Uninstalls', async () => { const version = '1.0'; - let [acquisitionWorker, eventStream, context, invoker] = setupWorker(true, version); + const [acquisitionWorker, eventStream, context, invoker] = setupWorker(true, version); const installKey = acquisitionWorker.getInstallKey(version); const res = await acquisitionWorker.acquireRuntime(version, invoker); await assertAcquisitionSucceeded(installKey, res.dotnetPath, eventStream, context); diff --git a/vscode-dotnet-runtime-library/src/test/unit/TestUtility.ts b/vscode-dotnet-runtime-library/src/test/unit/TestUtility.ts index af5cdaef..d15686ba 100644 --- a/vscode-dotnet-runtime-library/src/test/unit/TestUtility.ts +++ b/vscode-dotnet-runtime-library/src/test/unit/TestUtility.ts @@ -55,11 +55,11 @@ export function getMockUtilityContext() : IUtilityContext return utilityContext; } -export function getMockAcquireContext(version : string, legacy = false) : IDotnetAcquireContext +export function getMockAcquireContext(nextAcquiringVersion : string, legacy = false) : IDotnetAcquireContext { const acquireContext : IDotnetAcquireContext = { - version: version, + version: nextAcquiringVersion, architecture: legacy ? null : os.arch() }; return acquireContext;