From 847079da470030ff46837336afeed559be094dbe Mon Sep 17 00:00:00 2001 From: Gregory Mitchell Date: Thu, 28 Nov 2024 19:43:24 +0000 Subject: [PATCH] Update `jetbrains-installer` Tests --- .../distributors/jetbrains-installer.test.ts | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/__tests__/distributors/jetbrains-installer.test.ts b/__tests__/distributors/jetbrains-installer.test.ts index f0ca18b..bc09b95 100644 --- a/__tests__/distributors/jetbrains-installer.test.ts +++ b/__tests__/distributors/jetbrains-installer.test.ts @@ -25,22 +25,11 @@ describe('getAvailableVersions', () => { it('load available versions', async () => { spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); - spyHttpClient - .mockReturnValueOnce({ - statusCode: 200, - headers: {}, - result: manifestData as any - }) - .mockReturnValueOnce({ - statusCode: 200, - headers: {}, - result: manifestData as any - }) - .mockReturnValueOnce({ - statusCode: 200, - headers: {}, - result: [] - }); + spyHttpClient.mockReturnValueOnce({ + statusCode: 200, + headers: {}, + result: manifestData as any + }); const distribution = new JetBrainsDistribution({ version: '17', @@ -53,8 +42,8 @@ describe('getAvailableVersions', () => { const length = os.platform() === 'win32' - ? manifestData.length * 2 - 4 - : manifestData.length * 2; + ? manifestData.length - 2 + : manifestData.length + 1; expect(availableVersions.length).toBe(length); }, 10_000); });