From 082a8866f98d0a0e8138f362de5031c49705b2a1 Mon Sep 17 00:00:00 2001 From: Zachary Eisinger Date: Thu, 16 Jul 2020 21:14:02 -0700 Subject: [PATCH] Check install in tool directory with folder name --- __tests__/installer.test.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 9f46b10..d112e86 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -140,9 +140,7 @@ describe('installer tests', () => { } }, 400000); //This needs some time to download on "slower" internet connections - it('Acquires version of dotnet if no matching version is installed', async () => { - const dotnetDir = path.join(toolDir, 'dncs', '2.2.105', os.arch()); - + it('Acquires version of dotnet from global.json if no matching version is installed', async () => { const globalJsonPath = path.join(process.cwd(), 'global.json'); const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "2.2.105"${os.EOL}}${os.EOL}}`; if (!fs.existsSync(globalJsonPath)) { @@ -150,11 +148,11 @@ describe('installer tests', () => { } await setup.run(); - expect(fs.existsSync(`${dotnetDir}.complete`)).toBe(true); + expect(fs.existsSync(path.join(toolDir, 'sdk', '2.2.105'))).toBe(true); if (IS_WINDOWS) { - expect(fs.existsSync(path.join(dotnetDir, 'dotnet.exe'))).toBe(true); + expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true); } else { - expect(fs.existsSync(path.join(dotnetDir, 'dotnet'))).toBe(true); + expect(fs.existsSync(path.join(toolDir, 'dotnet'))).toBe(true); } fs.unlinkSync(globalJsonPath); }, 100000);