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-migration.spec.ts
2023-11-07 15:50:29 +00:00

61 lines
1.1 KiB
TypeScript

import { AutomergeMigration } from './automerge-migration';
describe('config/migrations/custom/automerge-migration', () => {
it('should migrate none', () => {
expect(AutomergeMigration).toMigrate(
{
automerge: 'none',
} as any,
{
automerge: false,
},
);
});
it('should migrate patch', () => {
expect(AutomergeMigration).toMigrate(
{
automerge: 'patch',
} as any,
{
patch: {
automerge: true,
},
minor: {
automerge: false,
},
major: {
automerge: false,
},
},
);
});
it('should migrate minor', () => {
expect(AutomergeMigration).toMigrate(
{
automerge: 'minor',
} as any,
{
minor: {
automerge: true,
},
major: {
automerge: false,
},
},
);
});
it('should migrate any', () => {
expect(AutomergeMigration).toMigrate(
{
automerge: 'any',
} as any,
{
automerge: true,
},
);
});
});