Skip to content

Commit

Permalink
test(formatting): add more unit test for complete the coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Akira Uehara committed Jan 22, 2024
1 parent 7e2503e commit f4c43d2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/utils/formatting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

0 comments on commit f4c43d2

Please sign in to comment.