0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/config/migrations/custom/automerge-major-migration.spec.ts
2023-11-07 15:50:29 +00:00

48 lines
1016 B
TypeScript

import { AutomergeMajorMigration } from './automerge-major-migration';
describe('config/migrations/custom/automerge-major-migration', () => {
it('should migrate value to object', () => {
expect(AutomergeMajorMigration).toMigrate(
{
automergeMajor: 'some-value',
},
{
major: {
automerge: true,
},
},
);
});
it('should migrate value to object and concat with existing minor object', () => {
expect(AutomergeMajorMigration).toMigrate(
{
automergeMajor: 'some-value',
major: {
matchFileNames: ['test'],
},
},
{
major: {
automerge: true,
matchFileNames: ['test'],
},
},
);
});
it('should ignore non object minor value', () => {
expect(AutomergeMajorMigration).toMigrate(
{
automergeMajor: 'some-value',
major: null,
},
{
major: {
automerge: true,
},
},
);
});
});