Skip to content
Snippets Groups Projects
Unverified Commit cfd680d4 authored by RahulGautamSingh's avatar RahulGautamSingh Committed by GitHub
Browse files

test: ensure presence of `CustomMigrationClasses` in `customMigrations` (#24171)

parent 7bc1f61c
No related branches found
No related tags found
No related merge requests found
import fs from 'node:fs';
import { join } from 'upath';
import type { RenovateConfig } from '../types';
import { AbstractMigration } from './base/abstract-migration';
import { MigrationsService } from './migrations-service';
......@@ -97,4 +99,15 @@ describe('config/migrations/migrations-service', () => {
}
expect(duplicateProperties).toBeEmptyArray();
});
it('includes all defined migration classes in MigrationsService.customMigrations', () => {
const allDefinedMigrationClasses: string[] = fs
.readdirSync(join(__dirname, 'custom'), { withFileTypes: true })
.map((file) => file.name)
.filter((name) => !name.includes('spec.ts'));
expect(MigrationsService.customMigrations).toHaveLength(
allDefinedMigrationClasses.length
);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment