| 65 | } |
| 66 | |
| 67 | async function copyTestFiles() { |
| 68 | for (const app of exerciseApps) { |
| 69 | if (app.includes('problem')) { |
| 70 | const solutionApp = app.replace('problem', 'solution') |
| 71 | const testDir = path.join(solutionApp, 'tests') |
| 72 | const destTestDir = path.join(app, 'tests') |
| 73 | |
| 74 | if (exists(testDir)) { |
| 75 | // Remove existing test directory in problem app if it exists |
| 76 | if (exists(destTestDir)) { |
| 77 | await fs.promises.rm(destTestDir, { recursive: true, force: true }) |
| 78 | } |
| 79 | |
| 80 | // Copy the entire test directory from solution to problem |
| 81 | await fs.promises.cp(testDir, destTestDir, { recursive: true }) |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | async function updateTsconfig() { |
| 88 | const tsconfig = { |