0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/modules/manager/cargo/range.spec.ts

26 lines
724 B
TypeScript

import type { RangeConfig } from '../types';
import { getRangeStrategy } from '.';
describe('modules/manager/cargo/range', () => {
it('returns same if not auto', () => {
const config: RangeConfig = { rangeStrategy: 'widen' };
expect(getRangeStrategy(config)).toBe('widen');
});
it('returns widen if current value includes <', () => {
const config: RangeConfig = {
rangeStrategy: 'auto',
currentValue: '<1.0.0',
};
expect(getRangeStrategy(config)).toBe('widen');
});
it('defaults to update-lockfile', () => {
const config: RangeConfig = {
rangeStrategy: 'auto',
currentValue: '1.0.0',
};
expect(getRangeStrategy(config)).toBe('update-lockfile');
});
});