From 3eb41a67963c073179f9ccc14746d7d77d1fe81c Mon Sep 17 00:00:00 2001 From: Erwin Morrhey Date: Mon, 31 Oct 2022 08:18:07 +0100 Subject: [PATCH] format code --- .../distributors/local-installer.test.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/__tests__/distributors/local-installer.test.ts b/__tests__/distributors/local-installer.test.ts index ac3af1c7..79edc4dc 100644 --- a/__tests__/distributors/local-installer.test.ts +++ b/__tests__/distributors/local-installer.test.ts @@ -202,13 +202,13 @@ describe('setupJava', () => { path: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture, 'Contents/Home') }; let originalPlatform = process.platform; - Object.defineProperty(process, 'platform', { + Object.defineProperty(process, 'platform', { value: 'darwin' - }); + }); spyFsStat = jest.spyOn(fs, 'existsSync'); spyFsStat.mockImplementation((file: string) => { - return file.endsWith('Contents/Home'); + return file.endsWith('Contents/Home'); }); mockJavaBase = new LocalDistribution(inputs, jdkFile); @@ -219,9 +219,9 @@ describe('setupJava', () => { `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` ); - Object.defineProperty(process, 'platform', { + Object.defineProperty(process, 'platform', { value: originalPlatform - }); + }); }); it('java is unpacked from jdkfile including Contents/Home on MacOS', async () => { @@ -237,12 +237,12 @@ describe('setupJava', () => { path: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture, 'Contents/Home') }; let originalPlatform = process.platform; - Object.defineProperty(process, 'platform', { + Object.defineProperty(process, 'platform', { value: 'darwin' - }); + }); spyFsStat = jest.spyOn(fs, 'existsSync'); spyFsStat.mockImplementation((file: string) => { - return file.endsWith('Contents/Home'); + return file.endsWith('Contents/Home'); }); mockJavaBase = new LocalDistribution(inputs, jdkFile); @@ -255,9 +255,9 @@ describe('setupJava', () => { expect(spyCoreInfo).toHaveBeenCalledWith( `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` ); - Object.defineProperty(process, 'platform', { + Object.defineProperty(process, 'platform', { value: originalPlatform - }); + }); }); it.each([