Adding Forgejo support (#23)

Signed-off-by: Janos Bonic <86970079+janosdebugs@users.noreply.github.com>
Co-authored-by: Bence Santha <bence@santha.eu>
This commit is contained in:
Janos 2024-01-30 19:49:40 +01:00 committed by GitHub
parent 24b9f144af
commit da3271e0a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 36 additions and 17 deletions

View file

@ -197,7 +197,7 @@ describe('getRelease', () => {
]
)('happy path: getRelease(\'%s\') -> \'%s\'', async (input, wantVersion) => {
const want = mockFetchReleases().find(el => el.version === wantVersion);
const gotRelease = await pkg.getRelease(input, mockFetchReleases);
const gotRelease = await pkg.getRelease(input, '', mockFetchReleases);
expect(gotRelease).toEqual(want);
});
@ -210,7 +210,7 @@ describe('getRelease', () => {
]
)('unhappy path: getRelease(\'%s\') -> throw Error(\'%s\')', async (input, wantErrorMessage, mockFetchReleasesFn) => {
try {
await pkg.getRelease(input, mockFetchReleasesFn);
await pkg.getRelease(input, '', mockFetchReleasesFn);
expect(true).toBe(false);
} catch (e) {
expect(e.message).toBe(wantErrorMessage);