mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2025-12-31 15:02:19 +00:00
feat: added versions resolution logic to use user's input.
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
parent
c68fac3149
commit
45ec8bfee0
4 changed files with 7 additions and 5 deletions
|
|
@ -186,10 +186,14 @@ function mockFetchReleases () {
|
|||
}
|
||||
|
||||
describe('getRelease', () => {
|
||||
it('shall return the latest release', async () => {
|
||||
it('shall return \'1.6.0-alpha2\' release', async () => {
|
||||
const version = '<1.6.0-alpha3';
|
||||
const want = mockFetchReleases().find(el => el.version === '1.6.0-alpha2');
|
||||
const gotRelease = await pkg.getRelease(version, mockFetchReleases);
|
||||
expect(gotRelease).toEqual(want);
|
||||
});
|
||||
|
||||
it('shall return the latest release', async () => {
|
||||
await pkg.getRelease('latest', mockFetchReleases);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue