Files
renovate/lib/config/migrations/custom/packages-migration.spec.ts
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00

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: [] }],
},
);
});
});