Skip to content

Commit

Permalink
test(config): Refactor tests for getDefault function (#23078)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov authored Jul 1, 2023
1 parent 4180370 commit 91f31b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/config/defaults.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ describe('config/defaults', () => {
expect(val).toBe(true);
});

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

expect(val).toBeNull();
});
});
}
);
});
});

0 comments on commit 91f31b4

Please sign in to comment.