Skip to content

Commit

Permalink
fix: updating tests related to channel naming
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtorres314 authored and Richard Torres committed Apr 21, 2024
1 parent 6b3cca3 commit 83c385e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/naming.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe('Naming policy utility functions', () => {
it.each([
['---', '---'],
[' ', '-'],
['UPPERCASE', 'UPPERCASE'],
['UPPERCASE', 'uppercase'],
['lowercase', 'lowercase'],
['!@#$%^&*()', '----------'],
])('name "%s" gets corrected to "%s"', async (name: string, corrected: string) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/naming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
* @returns string with special characters replaced with a hyphen
*/
export const parseName = (name = '') => {
return name.replace(/[^\w._-]/g, '-')
return name.replace(/[^\w._-]/g, '-').toLowerCase()
}

0 comments on commit 83c385e

Please sign in to comment.