diff --git a/frontend/src/components/common/Resource/index.test.ts b/frontend/src/components/common/Resource/index.test.ts index ae4c85ad8c..c2786f7eba 100644 --- a/frontend/src/components/common/Resource/index.test.ts +++ b/frontend/src/components/common/Resource/index.test.ts @@ -41,7 +41,7 @@ function getFilesToVerify() { const filesToVerify: string[] = []; fs.readdirSync(__dirname).forEach(file => { const fileNoSuffix = file.replace(/\.[^/.]+$/, ''); - if (!avoidCheck.find(suffix => fileNoSuffix.endsWith(suffix))) { + if (fileNoSuffix && !avoidCheck.find(suffix => fileNoSuffix.endsWith(suffix))) { filesToVerify.push(fileNoSuffix); } }); diff --git a/frontend/src/components/common/index.test.ts b/frontend/src/components/common/index.test.ts index a1d343491c..3cf0ac59b0 100644 --- a/frontend/src/components/common/index.test.ts +++ b/frontend/src/components/common/index.test.ts @@ -50,7 +50,7 @@ function getFilesToVerify() { const filesToVerify: string[] = []; fs.readdirSync(__dirname).forEach(file => { const fileNoSuffix = file.replace(/\.[^/.]+$/, ''); - if (!avoidCheck.find(suffix => fileNoSuffix.endsWith(suffix))) { + if (fileNoSuffix && !avoidCheck.find(suffix => fileNoSuffix.endsWith(suffix))) { filesToVerify.push(fileNoSuffix); } });