test(config): Refactor tests for getDefault function (#23078)

This commit is contained in:
Sergei Zharinov 2023-07-01 22:42:09 +03:00 committed by GitHub
parent 4180370e01
commit 91f31b4ee1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,8 +28,9 @@ describe('config/defaults', () => {
expect(val).toBe(true); expect(val).toBe(true);
}); });
['string', 'object', 'integer'].forEach((type: string) => { it.each(['string', 'object', 'integer'])(
it(`returns null for ${type} values`, () => { 'returns null for %s values',
(type: string) => {
const option: RenovateOptions = { const option: RenovateOptions = {
type: type as 'string' | 'object' | 'integer', type: type as 'string' | 'object' | 'integer',
description: 'thing', description: 'thing',
@ -38,7 +39,7 @@ describe('config/defaults', () => {
const val = getDefault(option); const val = getDefault(option);
expect(val).toBeNull(); expect(val).toBeNull();
}); }
}); );
}); });
}); });