chore(bidi): create parent dir for report.csv (#34294)
This commit is contained in:
parent
f0a3a15e93
commit
423005a7ab
|
|
@ -66,7 +66,10 @@ class CsvReporter implements Reporter {
|
||||||
}
|
}
|
||||||
const csv = rows.map(r => r.join(',')).join('\n');
|
const csv = rows.map(r => r.join(',')).join('\n');
|
||||||
const reportFile = path.resolve(this._options.configDir, this._options.outputFile || 'test-results.csv');
|
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() {
|
async onExit() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue