Closed achingbrain closed 1 month ago
This can be easily verified by removing your browser cache:
$ rm -rf ~/Library/Caches/ms-playwright
...and then directing stdout/stderr to files and examining their contents:
$ npx pw-test ./mocks/test.mocha.js > stdout.txt 2> stderr.txt
If a browser is downloaded during a test run, playwright will log on stdout.
This can interfere with the calling code if it's trying to parse the output of the program as, for example, JSON.
The fix is to temporarily replace
console.log
withconsole.error
as that's what the logPolitely function uses to give feedback to the user.The intention of the playwright maintainers is not for this functionality to be used during a test run so it's unlikely to move to stderr otherwise.
Type of change
Please delete options that are not relevant.