1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-08 20:38:19 +02:00

Fix for Candidate Not Iterable Error (#1082)

* candidates not iterable

* update the error message

* update error to debug

* update debug to info

* error message updates
This commit is contained in:
aparnajyothi-y 2025-04-17 19:25:44 +05:30 committed by GitHub
parent e348410e00
commit 6ed2c67c8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 91 additions and 9 deletions

View file

@ -8,10 +8,29 @@ import * as tc from '@actions/tool-cache';
jest.mock('@actions/http-client');
jest.mock('@actions/tool-cache');
const mockManifest = [{version: '1.0.0'}];
jest.mock('@actions/tool-cache', () => ({
getManifestFromRepo: jest.fn()
}));
const mockManifest = [
{
version: '1.0.0',
stable: true,
files: [
{
filename: 'tool-v1.0.0-linux-x64.tar.gz',
platform: 'linux',
arch: 'x64',
download_url: 'https://example.com/tool-v1.0.0-linux-x64.tar.gz'
}
]
}
];
describe('getManifest', () => {
beforeEach(() => {
jest.resetAllMocks();
});
it('should return manifest from repo', async () => {
(tc.getManifestFromRepo as jest.Mock).mockResolvedValue(mockManifest);
const manifest = await getManifest();