rename to filePath

This commit is contained in:
Simon Knott 2024-11-12 11:03:35 +01:00
parent cf0d3ecf57
commit 1da5972cd2
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -365,16 +365,16 @@ class HtmlBuilder {
return { ok, singleTestId }; return { ok, singleTestId };
} }
private async _writeReportData(path: string) { private async _writeReportData(filePath: string) {
fs.appendFileSync(path, '<script>\nwindow.playwrightReportBase64 = "data:application/zip;base64,'); fs.appendFileSync(filePath, '<script>\nwindow.playwrightReportBase64 = "data:application/zip;base64,');
await new Promise(f => { await new Promise(f => {
this._dataZipFile!.end(undefined, () => { this._dataZipFile!.end(undefined, () => {
this._dataZipFile!.outputStream this._dataZipFile!.outputStream
.pipe(new Base64Encoder()) .pipe(new Base64Encoder())
.pipe(fs.createWriteStream(path, { flags: 'a' })).on('close', f); .pipe(fs.createWriteStream(filePath, { flags: 'a' })).on('close', f);
}); });
}); });
fs.appendFileSync(path, '";</script>'); fs.appendFileSync(filePath, '";</script>');
} }
private _addDataFile(fileName: string, data: any) { private _addDataFile(fileName: string, data: any) {