mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 17:16:25 +00:00
24 lines
565 B
TypeScript
24 lines
565 B
TypeScript
import { api as nodever } from '.';
|
|
|
|
describe('semver.getNewValue()', () => {
|
|
it('returns normalized toVersion', () => {
|
|
expect(
|
|
nodever.getNewValue({
|
|
currentValue: '1.0.0',
|
|
rangeStrategy: 'replace',
|
|
fromVersion: '1.0.0',
|
|
toVersion: 'v1.1.0',
|
|
})
|
|
).toEqual('1.1.0');
|
|
});
|
|
it('returns range', () => {
|
|
expect(
|
|
nodever.getNewValue({
|
|
currentValue: '~8.0.0',
|
|
rangeStrategy: 'replace',
|
|
fromVersion: '8.0.2',
|
|
toVersion: 'v8.2.0',
|
|
})
|
|
).toEqual('~8.2.0');
|
|
});
|
|
});
|