mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
fix tests on windows
This commit is contained in:
parent
3eb41a6796
commit
10137ee6a8
1 changed files with 4 additions and 4 deletions
|
@ -199,7 +199,7 @@ describe('setupJava', () => {
|
|||
const jdkFile = 'not_existing_one';
|
||||
const expected = {
|
||||
version: actualJavaVersion,
|
||||
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;
|
||||
Object.defineProperty(process, 'platform', {
|
||||
|
@ -208,7 +208,7 @@ describe('setupJava', () => {
|
|||
|
||||
spyFsStat = jest.spyOn(fs, 'existsSync');
|
||||
spyFsStat.mockImplementation((file: string) => {
|
||||
return file.endsWith('Contents/Home');
|
||||
return file.endsWith('Home');
|
||||
});
|
||||
|
||||
mockJavaBase = new LocalDistribution(inputs, jdkFile);
|
||||
|
@ -234,7 +234,7 @@ describe('setupJava', () => {
|
|||
const jdkFile = expectedJdkFile;
|
||||
const expected = {
|
||||
version: '11.0.289',
|
||||
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;
|
||||
Object.defineProperty(process, 'platform', {
|
||||
|
@ -242,7 +242,7 @@ describe('setupJava', () => {
|
|||
});
|
||||
spyFsStat = jest.spyOn(fs, 'existsSync');
|
||||
spyFsStat.mockImplementation((file: string) => {
|
||||
return file.endsWith('Contents/Home');
|
||||
return file.endsWith('Home');
|
||||
});
|
||||
|
||||
mockJavaBase = new LocalDistribution(inputs, jdkFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue