mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
b4319928f1
* refactor: strict manager tests * chore: revert changes * Update lib/modules/manager/gradle/extract.spec.ts
39 lines
912 B
TypeScript
39 lines
912 B
TypeScript
import { extractPackageFile } from '.';
|
|
|
|
describe('modules/manager/ruby-version/extract', () => {
|
|
describe('extractPackageFile()', () => {
|
|
it('returns a result', () => {
|
|
const res = extractPackageFile('8.4.0\n');
|
|
expect(res.deps).toEqual([
|
|
{
|
|
currentValue: '8.4.0',
|
|
datasource: 'ruby-version',
|
|
depName: 'ruby',
|
|
},
|
|
]);
|
|
});
|
|
|
|
it('supports ranges', () => {
|
|
const res = extractPackageFile('8.4\n');
|
|
expect(res.deps).toEqual([
|
|
{
|
|
currentValue: '8.4',
|
|
datasource: 'ruby-version',
|
|
depName: 'ruby',
|
|
},
|
|
]);
|
|
});
|
|
|
|
it('skips non ranges', () => {
|
|
const res = extractPackageFile('latestn');
|
|
expect(res.deps).toEqual([
|
|
{
|
|
currentValue: 'latestn',
|
|
datasource: 'ruby-version',
|
|
depName: 'ruby',
|
|
},
|
|
]);
|
|
});
|
|
});
|
|
});
|