renovate/lib/versioning/node/index.spec.ts
2020-03-05 21:57:24 +01:00

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');
});
});