Skip to content

Commit

Permalink
chore(bidi): create parent dir for report.csv (#34294)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Jan 10, 2025
1 parent f0a3a15 commit 423005a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/bidi/csvReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ class CsvReporter implements Reporter {
}
const csv = rows.map(r => r.join(',')).join('\n');
const reportFile = path.resolve(this._options.configDir, this._options.outputFile || 'test-results.csv');
this._pendingWrite = fs.promises.writeFile(reportFile, csv);
this._pendingWrite = (async () => {
await fs.mkdirSync(path.dirname(reportFile), { recursive: true });
await fs.promises.writeFile(reportFile, csv);
})();
}

async onExit() {
Expand Down

0 comments on commit 423005a

Please sign in to comment.