renovate/lib/modules/manager/pyenv/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

26 lines
776 B
TypeScript

import { extractPackageFile } from '.';
describe('modules/manager/pyenv/extract', () => {
describe('extractPackageFile()', () => {
it('returns a result', () => {
const res = extractPackageFile('3.7.1\n');
expect(res.deps).toEqual([
{ depName: 'python', currentValue: '3.7.1', datasource: 'docker' },
]);
});
it('supports ranges', () => {
const res = extractPackageFile('3.8\n');
expect(res.deps).toEqual([
{ depName: 'python', currentValue: '3.8', datasource: 'docker' },
]);
});
it('skips non ranges', () => {
const res = extractPackageFile('latestn');
expect(res.deps).toEqual([
{ depName: 'python', currentValue: 'latestn', datasource: 'docker' },
]);
});
});
});