mirror of
https://github.com/actions/setup-java.git
synced 2025-05-21 18:01:46 +00:00
format code
This commit is contained in:
parent
3647a1d3c5
commit
3eb41a6796
@ -202,13 +202,13 @@ describe('setupJava', () => {
|
|||||||
path: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture, 'Contents/Home')
|
path: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture, 'Contents/Home')
|
||||||
};
|
};
|
||||||
let originalPlatform = process.platform;
|
let originalPlatform = process.platform;
|
||||||
Object.defineProperty(process, 'platform', {
|
Object.defineProperty(process, 'platform', {
|
||||||
value: 'darwin'
|
value: 'darwin'
|
||||||
});
|
});
|
||||||
|
|
||||||
spyFsStat = jest.spyOn(fs, 'existsSync');
|
spyFsStat = jest.spyOn(fs, 'existsSync');
|
||||||
spyFsStat.mockImplementation((file: string) => {
|
spyFsStat.mockImplementation((file: string) => {
|
||||||
return file.endsWith('Contents/Home');
|
return file.endsWith('Contents/Home');
|
||||||
});
|
});
|
||||||
|
|
||||||
mockJavaBase = new LocalDistribution(inputs, jdkFile);
|
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...`
|
`Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...`
|
||||||
);
|
);
|
||||||
|
|
||||||
Object.defineProperty(process, 'platform', {
|
Object.defineProperty(process, 'platform', {
|
||||||
value: originalPlatform
|
value: originalPlatform
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('java is unpacked from jdkfile including Contents/Home on MacOS', async () => {
|
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')
|
path: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture, 'Contents/Home')
|
||||||
};
|
};
|
||||||
let originalPlatform = process.platform;
|
let originalPlatform = process.platform;
|
||||||
Object.defineProperty(process, 'platform', {
|
Object.defineProperty(process, 'platform', {
|
||||||
value: 'darwin'
|
value: 'darwin'
|
||||||
});
|
});
|
||||||
spyFsStat = jest.spyOn(fs, 'existsSync');
|
spyFsStat = jest.spyOn(fs, 'existsSync');
|
||||||
spyFsStat.mockImplementation((file: string) => {
|
spyFsStat.mockImplementation((file: string) => {
|
||||||
return file.endsWith('Contents/Home');
|
return file.endsWith('Contents/Home');
|
||||||
});
|
});
|
||||||
|
|
||||||
mockJavaBase = new LocalDistribution(inputs, jdkFile);
|
mockJavaBase = new LocalDistribution(inputs, jdkFile);
|
||||||
@ -255,9 +255,9 @@ describe('setupJava', () => {
|
|||||||
expect(spyCoreInfo).toHaveBeenCalledWith(
|
expect(spyCoreInfo).toHaveBeenCalledWith(
|
||||||
`Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...`
|
`Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...`
|
||||||
);
|
);
|
||||||
Object.defineProperty(process, 'platform', {
|
Object.defineProperty(process, 'platform', {
|
||||||
value: originalPlatform
|
value: originalPlatform
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it.each([
|
it.each([
|
||||||
|
Loading…
Reference in New Issue
Block a user