From 91f31b4ee1bc4d2b87a29a7fdb2d3c06eb0577ca Mon Sep 17 00:00:00 2001 From: Sergei Zharinov <zharinov@users.noreply.github.com> Date: Sat, 1 Jul 2023 22:42:09 +0300 Subject: [PATCH] test(config): Refactor tests for `getDefault` function (#23078) --- lib/config/defaults.spec.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/config/defaults.spec.ts b/lib/config/defaults.spec.ts index f71d89c812..1fd77afdd3 100644 --- a/lib/config/defaults.spec.ts +++ b/lib/config/defaults.spec.ts @@ -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', @@ -38,7 +39,7 @@ describe('config/defaults', () => { const val = getDefault(option); expect(val).toBeNull(); - }); - }); + } + ); }); }); -- GitLab