test: fix graalvm installer test formatting

This commit is contained in:
copilot-swe-agent[bot]
2026-06-23 01:29:03 +00:00
committed by GitHub
parent c1835719f6
commit 2061db5b9b
@@ -251,7 +251,9 @@ describe('GraalVMDistribution', () => {
}); });
it('should use a dedicated toolcache folder for GraalVM Community', async () => { it('should use a dedicated toolcache folder for GraalVM Community', async () => {
const result = await (communityDistribution as any).downloadTool(javaRelease); const result = await (communityDistribution as any).downloadTool(
javaRelease
);
expect(tc.cacheDir).toHaveBeenCalledWith( expect(tc.cacheDir).toHaveBeenCalledWith(
path.join('/tmp/extracted', 'graalvm-jdk-17.0.5'), path.join('/tmp/extracted', 'graalvm-jdk-17.0.5'),
@@ -973,7 +975,9 @@ describe('GraalVMDistribution', () => {
describe('GraalVMCommunityDistribution', () => { describe('GraalVMCommunityDistribution', () => {
beforeEach(() => { beforeEach(() => {
jest.spyOn(communityDistribution, 'getPlatform').mockReturnValue('linux'); jest
.spyOn(communityDistribution, 'getPlatform')
.mockReturnValue('linux');
}); });
it('should resolve an exact GraalVM Community version from GitHub releases', async () => { it('should resolve an exact GraalVM Community version from GitHub releases', async () => {
@@ -995,9 +999,9 @@ describe('GraalVMDistribution', () => {
headers: {} headers: {}
}); });
const result = await (communityDistribution as any).findPackageForDownload( const result = await (
'21.0.2' communityDistribution as any
); ).findPackageForDownload('21.0.2');
expect(result).toEqual({ expect(result).toEqual({
url: 'https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz', url: 'https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz',
@@ -1035,9 +1039,9 @@ describe('GraalVMDistribution', () => {
headers: {} headers: {}
}); });
const result = await (communityDistribution as any).findPackageForDownload( const result = await (
'21' communityDistribution as any
); ).findPackageForDownload('21');
expect(result).toEqual({ expect(result).toEqual({
url: 'https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz', url: 'https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz',
@@ -1050,11 +1054,12 @@ describe('GraalVMDistribution', () => {
await expect( await expect(
(communityDistribution as any).findPackageForDownload('23') (communityDistribution as any).findPackageForDownload('23')
).rejects.toThrow('GraalVM Community does not provide early access builds'); ).rejects.toThrow(
'GraalVM Community does not provide early access builds'
);
}); });
}); });
}); });
}); });
describe('distribution factory', () => { describe('distribution factory', () => {