Skip to content

Commit

Permalink
frontend: Fix file check test
Browse files Browse the repository at this point in the history
Signed-off-by: Kautilya Tripathi <[email protected]>
  • Loading branch information
knrt10 committed Dec 1, 2024
1 parent c80b639 commit e0e8db6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/common/Resource/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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);
}
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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);
}
});
Expand Down

0 comments on commit e0e8db6

Please sign in to comment.