From f4c43d267c77a635ee533dd44466849d014765e8 Mon Sep 17 00:00:00 2001 From: Lucas Akira Uehara Date: Mon, 22 Jan 2024 08:30:34 -0300 Subject: [PATCH] test(formatting): add more unit test for complete the coverage --- test/utils/formatting.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/utils/formatting.test.ts b/test/utils/formatting.test.ts index 3deb38f5d..ec16308c0 100644 --- a/test/utils/formatting.test.ts +++ b/test/utils/formatting.test.ts @@ -30,4 +30,16 @@ describe('normalizeToKebabOrSnakeCase', () => { const output = normalizeToKebabOrSnakeCase(input); expect(output).toBe('leading-and-trailing-spaces'); }); + + it('should handle nil value', () => { + const input = null; + const output = normalizeToKebabOrSnakeCase(input); + expect(output).toBe(undefined); + }); + + it('should handle undefined value', () => { + const input = undefined; + const output = normalizeToKebabOrSnakeCase(input); + expect(output).toBe(undefined); + }); });