Skip to content

Commit

Permalink
Fix tests for some changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
brendandburns committed Nov 30, 2021
1 parent 3d55049 commit 27f2600
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion __tests__/distributors/microsoft-installer.test.ts
Expand Up @@ -53,7 +53,7 @@ describe('findPackageForDownload', () => {

it('should throw an error', async () => {
await expect(distribution['findPackageForDownload']('8')).rejects.toThrow(
/Could not find satisfied version for semver */
/Could not find satisfied version for SemVer */
);
});
});
Expand Down
10 changes: 5 additions & 5 deletions src/distributions/microsoft/installer.ts
Expand Up @@ -48,7 +48,7 @@ export class MicrosoftDistributions extends JavaBase {

const opts = this.getPlatformOption();
const availableVersions = availableVersionsRaw.map(item => ({
url: `https://aka.ms/download-jdk/microsoft-jdk-${item.fullVersion}-${opts.os}-${this.architecture}.${opts.archive}`,
url: `https://aka.ms/download-jdk/microsoft-jdk-${item.fullVersion.join('.')}-${opts.os}-${this.architecture}.${opts.archive}`,
version: this.convertVersionToSemver(item)
}));

Expand Down Expand Up @@ -78,14 +78,14 @@ export class MicrosoftDistributions extends JavaBase {
majorVersion: 17,
minorVersion: 0,
patchVersion: 1,
fullVersion: '17.0.1.12.1'
fullVersion: [17,0,1,12,1],
},
{
majorVersion: 16,
minorVersion: 0,
patchVersion: 2,
fullVersion: '16.0.2.7.1'
}
fullVersion: [16,0,2.7,1],
},
];

// M1 is only supported for Java 16 & 17
Expand All @@ -94,7 +94,7 @@ export class MicrosoftDistributions extends JavaBase {
majorVersion: 11,
minorVersion: 0,
patchVersion: 13,
fullVersion: '11.0.13.8.1'
fullVersion: [11, 0, 13, 8, 1],
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/distributions/microsoft/models.ts
Expand Up @@ -11,5 +11,5 @@ export interface MicrosoftVersion {
majorVersion: number;
minorVersion: number;
patchVersion: number;
fullVersion: string;
fullVersion: Array<number>;
}

0 comments on commit 27f2600

Please sign in to comment.