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/platform-commit-migration.spec.ts
RahulGautamSingh bb6c27faf8 feat(github): convert platformCommit to enum (#29156)
BREAKING CHANGE: platformCommit will be automatically enabled if running as a GitHub app
2024-07-25 15:28:16 +02:00

39 lines
918 B
TypeScript

import { PlatformCommitMigration } from './platform-commit-migration';
describe('config/migrations/custom/platform-commit-migration', () => {
it('should migrate platformCommit=true to platformCommit=enabled', () => {
expect(PlatformCommitMigration).toMigrate(
{
// @ts-expect-error: old type
platformCommit: true,
},
{
platformCommit: 'enabled',
},
);
});
it('should migrate platformCommit=false to platformCommit=disabled', () => {
expect(PlatformCommitMigration).toMigrate(
{
// @ts-expect-error: old type
platformCommit: false,
},
{
platformCommit: 'disabled',
},
);
});
it('should not migrate platformCommit=auto', () => {
expect(PlatformCommitMigration).not.toMigrate(
{
platformCommit: 'auto',
},
{
platformCommit: 'auto',
},
);
});
});