fix: fixes test to avoid mock github API call

Signed-off-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
Dmitry Kisler 2023-10-26 16:30:30 +02:00
parent abd9f2b70f
commit f6bca00835
No known key found for this signature in database
GPG key ID: 46C0A987D58548F6

View file

@ -203,8 +203,8 @@ describe('getRelease', () => {
it.each(
[
['foo', 'Input version cannot be used, see semver: https://semver.org/spec/v2.0.0.html', undefined],
['2.0', 'No matching version found', undefined],
['foo', 'Input version cannot be used, see semver: https://semver.org/spec/v2.0.0.html', mockFetchReleases],
['2.0', 'No matching version found', mockFetchReleases],
['latest', 'No tofu releases found, please contact OpenTofu', async () => { return null; }],
['latest', 'No tofu releases found, please contact OpenTofu', async () => { return []; }]
]