Skip to content

Commit

Permalink
Fix reports download. Now we take only one report if specificPrefix i…
Browse files Browse the repository at this point in the history
…s provided (#144)

* Added bank api-test-run dockerfiles generation test

* Prettier

* Fix reports download. Now we take only one report if specificPrefix is provided
  • Loading branch information
aydarng authored Dec 11, 2024
1 parent 9942afe commit 11ca411
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ examples/signify-react-ts/.cache
/signify-ts-test/test/data/600-banks-test-data/
/signify-ts-test/test/data/tmp_reports/
/signify-ts-test/test/data/tmp_reports_unpacked/
/images/
10 changes: 5 additions & 5 deletions signify-ts-test/test/run-bank-reports-download.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,26 @@ const moveReports = (
}

const items = fs.readdirSync(srcDir);
items.forEach((item: any) => {
for (const item of items) {
if (specificPrefix) {
const aidPath = path.join(srcDir, item);
const aidReps = fs.readdirSync(aidPath);
aidReps.forEach((rep: any) => {
for (const rep of aidReps) {
if (rep.startsWith(specificPrefix)) {
const srcPath = path.join(aidPath, rep);
const destPath = path.join(destDir, item, rep);
fs.cpSync(srcPath, destPath, { recursive: true });
console.log(`Moved specific report: ${srcPath} to ${destPath}`);
return;
break;
}
});
}
} else {
const srcPath = path.join(srcDir, item);
const destPath = path.join(destDir, item);
fs.cpSync(srcPath, destPath, { recursive: true });
console.log(`Moved report folder: ${srcPath} to ${destPath}`);
}
});
}
};

const moveFiles = (srcDir: string, destDir: string) => {
Expand Down

0 comments on commit 11ca411

Please sign in to comment.