mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 21:48:32 +00:00
879f7cc212
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com> Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
39 lines
981 B
TypeScript
39 lines
981 B
TypeScript
import { PackagesMigration } from './packages-migration';
|
|
|
|
describe('config/migrations/custom/packages-migration', () => {
|
|
it('should migrate to package rules', () => {
|
|
expect(PackagesMigration).toMigrate(
|
|
{
|
|
packages: [{ matchPackageNames: ['*'] }],
|
|
},
|
|
{
|
|
packageRules: [{ matchPackageNames: ['*'] }],
|
|
},
|
|
);
|
|
});
|
|
|
|
it('should concat with existing package rules', () => {
|
|
expect(PackagesMigration).toMigrate(
|
|
{
|
|
packages: [{ matchPackageNames: ['*'] }],
|
|
packageRules: [{ matchPackageNames: [] }],
|
|
},
|
|
{
|
|
packageRules: [{ matchPackageNames: [] }, { matchPackageNames: ['*'] }],
|
|
},
|
|
);
|
|
});
|
|
|
|
it('should ignore non array value', () => {
|
|
expect(PackagesMigration).toMigrate(
|
|
{
|
|
packages: { matchPackageNames: ['*'] },
|
|
packageRules: [{ matchPackageNames: [] }],
|
|
},
|
|
{
|
|
packageRules: [{ matchPackageNames: [] }],
|
|
},
|
|
);
|
|
});
|
|
});
|