Skip to content

Commit f4c43d2

Browse files
author
Lucas Akira Uehara
committed
test(formatting): add more unit test for complete the coverage
1 parent 7e2503e commit f4c43d2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/utils/formatting.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,16 @@ describe('normalizeToKebabOrSnakeCase', () => {
3030
const output = normalizeToKebabOrSnakeCase(input);
3131
expect(output).toBe('leading-and-trailing-spaces');
3232
});
33+
34+
it('should handle nil value', () => {
35+
const input = null;
36+
const output = normalizeToKebabOrSnakeCase(input);
37+
expect(output).toBe(undefined);
38+
});
39+
40+
it('should handle undefined value', () => {
41+
const input = undefined;
42+
const output = normalizeToKebabOrSnakeCase(input);
43+
expect(output).toBe(undefined);
44+
});
3345
});

0 commit comments

Comments
 (0)