From 9480036ff97f56bb7ee23e12b48016558771dda1 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Aug 2021 16:35:44 +0300 Subject: [PATCH] Fix unit test --- __tests__/setup-dotnet.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/setup-dotnet.test.ts b/__tests__/setup-dotnet.test.ts index 72d3856..a1eaca6 100644 --- a/__tests__/setup-dotnet.test.ts +++ b/__tests__/setup-dotnet.test.ts @@ -10,7 +10,7 @@ import * as setup from '../src/setup-dotnet'; const IS_WINDOWS = process.platform === 'win32'; -describe('setup-dotnet tests', () => { +describe.only('setup-dotnet tests', () => { beforeAll(async () => { process.env.RUNNER_TOOL_CACHE = toolDir; process.env.DOTNET_INSTALL_DIR = toolDir; @@ -45,9 +45,9 @@ describe('setup-dotnet tests', () => { } }, 400000); - it('Acquires version of dotnet from global.json if no matching version is installed', async () => { + it.only('Acquires version of dotnet from global.json with rollForward option, install the latest patch', async () => { const globalJsonPath = path.join(process.cwd(), 'global.json'); - const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version": "3.1.201",${os.EOL}"rollForward": "latestFeature"${os.EOL}}${os.EOL}}`; + const jsonContents = `{${os.EOL}"sdk": {${os.EOL}"version":"3.1.201",${os.EOL}"rollForward":"latestFeature"${os.EOL}}${os.EOL}}`; if (!fs.existsSync(globalJsonPath)) { fs.writeFileSync(globalJsonPath, jsonContents); }