From d5f73c2e15f046c01a0e46d904259f15a9b215ba Mon Sep 17 00:00:00 2001 From: Tian Feng Date: Tue, 6 Aug 2024 16:25:55 -0700 Subject: [PATCH] put console log under assets folder --- src/playwright-recorder.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/playwright-recorder.ts b/src/playwright-recorder.ts index 19855fa0..8811b224 100644 --- a/src/playwright-recorder.ts +++ b/src/playwright-recorder.ts @@ -12,10 +12,13 @@ const escapeSequenceRegex = new RegExp( export function playwrightRecorder() { // console.log is saved out of reportsDir since it is cleared on startup. - const ws = fs.createWriteStream(path.join(process.cwd(), 'console2.log'), { - flags: 'w+', - mode: 0o644, - }); + const ws = fs.createWriteStream( + path.join(process.cwd(), '__assets__', 'console2.log'), + { + flags: 'w+', + mode: 0o644, + }, + ); const stripAsciiTransform = new Transform({ transform(chunk, _, callback) { // list reporter uses escape codes to rewrite lines, strip them to make console output more readable