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 committed May 3, 2024
1 parent a9dd7ab commit e55d42c
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 e55d42c

Please sign in to comment.