mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
38 lines
909 B
TypeScript
38 lines
909 B
TypeScript
import { ComposerIgnorePlatformReqsMigration } from './composer-ignore-platform-reqs-migration';
|
|
|
|
describe('config/migrations/custom/composer-ignore-platform-reqs-migration', () => {
|
|
it('should migrate true to empty array', () => {
|
|
expect(ComposerIgnorePlatformReqsMigration).toMigrate(
|
|
{
|
|
composerIgnorePlatformReqs: true,
|
|
},
|
|
{
|
|
composerIgnorePlatformReqs: [],
|
|
},
|
|
);
|
|
});
|
|
|
|
it('should migrate false to null', () => {
|
|
expect(ComposerIgnorePlatformReqsMigration).toMigrate(
|
|
{
|
|
composerIgnorePlatformReqs: false,
|
|
},
|
|
{
|
|
composerIgnorePlatformReqs: null,
|
|
},
|
|
);
|
|
});
|
|
|
|
it('should not change array value', () => {
|
|
expect(ComposerIgnorePlatformReqsMigration).toMigrate(
|
|
{
|
|
composerIgnorePlatformReqs: [],
|
|
},
|
|
{
|
|
composerIgnorePlatformReqs: [],
|
|
},
|
|
false,
|
|
);
|
|
});
|
|
});
|