mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 10:26:46 +00:00
resolving comment
This commit is contained in:
parent
4e8be27276
commit
7f8371344e
4 changed files with 79 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
|||
import { MicrosoftDistributions } from '../../src/distributions/microsoft/installer';
|
||||
import * as tc from '@actions/tool-cache';
|
||||
import data from '../../versions-manifest.json';
|
||||
import data from '../../src/distributions/microsoft/microsoft-openjdk-versions.json';
|
||||
import * as httpm from '@actions/http-client';
|
||||
import * as core from '@actions/core';
|
||||
|
||||
describe('findPackageForDownload', () => {
|
||||
|
@ -16,9 +17,11 @@ describe('findPackageForDownload', () => {
|
|||
checkLatest: false
|
||||
});
|
||||
|
||||
spyGetManifestFromRepo = jest.spyOn(tc, 'getManifestFromRepo');
|
||||
spyGetManifestFromRepo.mockImplementation(() => {
|
||||
return data;
|
||||
spyGetManifestFromRepo = jest.spyOn(httpm.HttpClient.prototype, 'getJson');
|
||||
spyGetManifestFromRepo.mockReturnValue({
|
||||
result: JSON.stringify(data),
|
||||
statusCode: 200,
|
||||
headers: {}
|
||||
});
|
||||
|
||||
spyDebug = jest.spyOn(core, 'debug');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue