0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/modules/manager/terraform-version/extract.spec.ts
Michael Kriese b4319928f1
refactor: strict manager tests (#16155)
* refactor: strict manager tests

* chore: revert changes

* Update lib/modules/manager/gradle/extract.spec.ts
2022-06-20 17:05:39 +02:00

32 lines
767 B
TypeScript

import { extractPackageFile } from '.';
describe('modules/manager/terraform-version/extract', () => {
describe('extractPackageFile()', () => {
it('returns a result', () => {
const res = extractPackageFile('12.0.0\n');
expect(res).toEqual({
deps: [
{
depName: 'hashicorp/terraform',
currentValue: '12.0.0',
datasource: 'github-releases',
},
],
});
});
it('skips non ranges', () => {
const res = extractPackageFile('latest');
expect(res).toEqual({
deps: [
{
depName: 'hashicorp/terraform',
currentValue: 'latest',
datasource: 'github-releases',
},
],
});
});
});
});