mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-02 02:29:51 +00:00
930cf6633c
fix: Additional vi.mock path corrections and prettier formatting
39 lines
1020 B
TypeScript
39 lines
1020 B
TypeScript
import { PackagesMigration } from './packages-migration.ts';
|
|
|
|
describe('config/migrations/custom/packages-migration', () => {
|
|
it('should migrate to package rules', async () => {
|
|
await expect(PackagesMigration).toMigrate(
|
|
{
|
|
packages: [{ matchPackageNames: ['*'] }],
|
|
},
|
|
{
|
|
packageRules: [{ matchPackageNames: ['*'] }],
|
|
},
|
|
);
|
|
});
|
|
|
|
it('should concat with existing package rules', async () => {
|
|
await expect(PackagesMigration).toMigrate(
|
|
{
|
|
packages: [{ matchPackageNames: ['*'] }],
|
|
packageRules: [{ matchPackageNames: [] }],
|
|
},
|
|
{
|
|
packageRules: [{ matchPackageNames: [] }, { matchPackageNames: ['*'] }],
|
|
},
|
|
);
|
|
});
|
|
|
|
it('should ignore non array value', async () => {
|
|
await expect(PackagesMigration).toMigrate(
|
|
{
|
|
packages: { matchPackageNames: ['*'] },
|
|
packageRules: [{ matchPackageNames: [] }],
|
|
},
|
|
{
|
|
packageRules: [{ matchPackageNames: [] }],
|
|
},
|
|
);
|
|
});
|
|
});
|