mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
test(config): Refactor tests for getDefault
function (#23078)
This commit is contained in:
parent
4180370e01
commit
91f31b4ee1
1 changed files with 5 additions and 4 deletions
|
@ -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();
|
||||||
});
|
}
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue