0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/modules/manager/bitrise/utils.spec.ts
2024-07-26 09:34:20 +00:00

29 lines
896 B
TypeScript

import { BitriseDatasource } from '../../datasource/bitrise';
import { parseStep } from './utils';
describe('modules/manager/bitrise/utils', () => {
describe('parseStep()', () => {
it('returns null on an empty string', () => {
expect(parseStep('')).toBeNull();
});
it('returns dependency for step', () => {
expect(parseStep('restore-gradle-cache@1.1.2')).toEqual({
currentValue: '1.1.2',
datasource: BitriseDatasource.id,
packageName: 'restore-gradle-cache',
replaceString: 'restore-gradle-cache@1.1.2',
});
});
it('parses missing version', () => {
expect(parseStep('share-pipeline-variable')).toEqual({
datasource: BitriseDatasource.id,
packageName: 'share-pipeline-variable',
replaceString: 'share-pipeline-variable',
skipReason: 'unspecified-version',
});
});
});
});