mirror of
https://github.com/actions/setup-java.git
synced 2024-12-01 21:00:56 -05:00
Update jetbrains-installer
Tests
This commit is contained in:
parent
393543671a
commit
847079da47
1 changed files with 7 additions and 18 deletions
|
@ -25,21 +25,10 @@ describe('getAvailableVersions', () => {
|
|||
|
||||
it('load available versions', async () => {
|
||||
spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson');
|
||||
spyHttpClient
|
||||
.mockReturnValueOnce({
|
||||
spyHttpClient.mockReturnValueOnce({
|
||||
statusCode: 200,
|
||||
headers: {},
|
||||
result: manifestData as any
|
||||
})
|
||||
.mockReturnValueOnce({
|
||||
statusCode: 200,
|
||||
headers: {},
|
||||
result: manifestData as any
|
||||
})
|
||||
.mockReturnValueOnce({
|
||||
statusCode: 200,
|
||||
headers: {},
|
||||
result: []
|
||||
});
|
||||
|
||||
const distribution = new JetBrainsDistribution({
|
||||
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue