0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-11 13:48:55 +00:00
renovatebot_renovate/lib/config/migrations/custom/custom-managers-migration.spec.ts
2023-11-07 15:50:29 +00:00

45 lines
1.4 KiB
TypeScript

import { partial } from '../../../../test/util';
import type { CustomManager } from '../../../modules/manager/custom/types';
import { CustomManagersMigration } from './custom-managers-migration';
describe('config/migrations/custom/custom-managers-migration', () => {
it('migrates', () => {
expect(CustomManagersMigration).toMigrate(
{
customManagers: partial<CustomManager>([
{
fileMatch: ['js', '***$}{]]['],
matchStrings: ['^(?<depName>foo)(?<currentValue>bar)$'],
datasourceTemplate: 'maven',
versioningTemplate: 'gradle',
},
{
customType: 'regex',
fileMatch: ['js', '***$}{]]['],
matchStrings: ['^(?<depName>foo)(?<currentValue>bar)$'],
datasourceTemplate: 'maven',
versioningTemplate: 'gradle',
},
]),
},
{
customManagers: [
{
customType: 'regex',
fileMatch: ['js', '***$}{]]['],
matchStrings: ['^(?<depName>foo)(?<currentValue>bar)$'],
datasourceTemplate: 'maven',
versioningTemplate: 'gradle',
},
{
customType: 'regex',
fileMatch: ['js', '***$}{]]['],
matchStrings: ['^(?<depName>foo)(?<currentValue>bar)$'],
datasourceTemplate: 'maven',
versioningTemplate: 'gradle',
},
],
},
);
});
});