mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 17:16:25 +00:00
22 lines
814 B
TypeScript
22 lines
814 B
TypeScript
import { massageConfig } from '../../massage';
|
|
import { validateConfig } from '../../validation';
|
|
import * as internal from '.';
|
|
|
|
jest.mock('../../../datasource/npm');
|
|
|
|
const ignoredPresets = ['default:group', 'default:timezone'];
|
|
|
|
describe('config/presets/internal', () => {
|
|
for (const [groupName, groupPresets] of Object.entries(internal.groups)) {
|
|
for (const [presetName, presetConfig] of Object.entries(groupPresets)) {
|
|
const preset = `${groupName}:${presetName}`;
|
|
if (presetName !== 'description' && !ignoredPresets.includes(preset)) {
|
|
it(`${preset} validates`, async () => {
|
|
const res = await validateConfig(massageConfig(presetConfig), true);
|
|
expect(res.errors).toHaveLength(0);
|
|
expect(res.warnings).toHaveLength(0);
|
|
});
|
|
}
|
|
}
|
|
}
|
|
});
|