fix URL for download available versions

This commit is contained in:
Daniil Razorenov 2021-11-10 11:18:26 +03:00
parent 702749fb5a
commit 1eb0ec886a
3 changed files with 10 additions and 10 deletions

View file

@ -48,7 +48,9 @@ describe('getAvailableVersions', () => {
'bundle-type=jre&fx=true&bitness=64&arch=arm&build-type=all'
]
])('build correct url for %s -> %s', async (input, urlParams) => {
const additionalParams = '&installation-type=archive&fields=downloadUrl%2Cversion';
const additionalParams =
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
'updateVersion%2CbuildVersion';
const distribution = new LibericaDistributions(input);
distribution['getPlatformOption'] = () => 'macos';
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=macos&${urlParams}${additionalParams}`;
@ -98,7 +100,7 @@ describe('getArchitectureOptions', () => {
});
expect(() => distributions['getArchitectureOptions']()).toThrow(
/Architecture '\w+' not supported\. Supported architecture: .*/
/Architecture '\w+' is not supported\. Supported architectures: .*/
);
});
});
@ -164,7 +166,7 @@ describe('getPlatformOption', () => {
'not support os version %s',
input => {
expect(() => distributions['getPlatformOption'](input as NodeJS.Platform)).toThrow(
/Platform '\w+' not supported\. Supported platform: .+/
/Platform '\w+' is not supported\. Supported platforms: .+/
);
}
);