diff --git a/scripts/utils.mjs b/scripts/utils.mjs index 3a81ca31..1f4a6fa1 100644 --- a/scripts/utils.mjs +++ b/scripts/utils.mjs @@ -9,7 +9,7 @@ export function isDemoFile(filename) { } export function isTestFile(filename) { - const hookTestRegex = new RegExp('^use[A-Z][a-zA-Z]*.test.ts$') + const hookTestRegex = new RegExp('^use[A-Z][a-zA-Z]*.test.tsx?$') return hookTestRegex.test(filename) } @@ -17,7 +17,7 @@ export function camelToKebabCase(str) { return str.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`) } -export const toQueryParams = (params) => { +export const toQueryParams = params => { const paramsAsString = Object.entries(params) .filter(([_, value]) => !!value) .map(([key, value]) => `${key}=${value}`)