Skip to content

Commit

Permalink
fix filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng92 committed Aug 7, 2024
1 parent 3b3a91b commit 588b315
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/playwright-recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ const escapeSequenceRegex = new RegExp(
);

export function playwrightRecorder() {
const ws = fs.createWriteStream(
path.join(process.cwd(), '__assets__', 'console.log'),
{
flags: 'w+',
mode: 0o644,
},
);
const assetsPath = path.join(process.cwd(), '__assets__');
if (!fs.existsSync(assetsPath)) {
fs.mkdirSync(assetsPath);
}
const ws = fs.createWriteStream(path.join(assetsPath, 'console.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
Expand Down

0 comments on commit 588b315

Please sign in to comment.