mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
bb6c27faf8
BREAKING CHANGE: platformCommit will be automatically enabled if running as a GitHub app
39 lines
918 B
TypeScript
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',
|
|
},
|
|
);
|
|
});
|
|
});
|