mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 09:06:25 +00:00
cbca54d0c3
Removes all logic where rangeStrategy=auto results in pinning. Closes #18304 BREAKING CHANGE: Dependencies are no longer automatically pinned, pinning must be opted into using rangeStrategy=pin
37 lines
949 B
TypeScript
37 lines
949 B
TypeScript
import type { RangeConfig } from './types';
|
|
import { getRangeStrategy } from '.';
|
|
|
|
describe('modules/manager/range', () => {
|
|
it('returns same if not auto', () => {
|
|
const config: RangeConfig = {
|
|
manager: 'npm',
|
|
rangeStrategy: 'widen',
|
|
};
|
|
expect(getRangeStrategy(config)).toBe('widen');
|
|
});
|
|
|
|
it('returns manager strategy', () => {
|
|
const config: RangeConfig = {
|
|
manager: 'npm',
|
|
rangeStrategy: 'auto',
|
|
depType: 'dependencies',
|
|
};
|
|
expect(getRangeStrategy(config)).toBe('replace');
|
|
});
|
|
|
|
it('defaults to replace', () => {
|
|
const config: RangeConfig = {
|
|
manager: 'circleci',
|
|
rangeStrategy: 'auto',
|
|
};
|
|
expect(getRangeStrategy(config)).toBe('replace');
|
|
});
|
|
|
|
it('returns rangeStrategy if not auto', () => {
|
|
const config: RangeConfig = {
|
|
manager: 'circleci',
|
|
rangeStrategy: 'future',
|
|
};
|
|
expect(getRangeStrategy(config)).toBe('future');
|
|
});
|
|
});
|