format code

This commit is contained in:
Erwin Morrhey 2022-10-31 08:18:07 +01:00
parent 3647a1d3c5
commit 3eb41a6796

View file

@ -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([