From 6f932fcb4a554439b4a5e5206924efa37e5b0ca0 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 12 Jan 2022 08:43:25 -0700 Subject: [PATCH] fix: default list reporter should dump stderr to stderr (#11351) This is consistent with all other reporters we have in place. --- installation-tests/installation-tests.sh | 2 +- packages/playwright-test/src/reporters/list.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installation-tests/installation-tests.sh b/installation-tests/installation-tests.sh index cdebcc66c3..f2da27e90e 100755 --- a/installation-tests/installation-tests.sh +++ b/installation-tests/installation-tests.sh @@ -633,7 +633,7 @@ function test_playwright_test_stacks_should_work { copy_test_scripts echo "Running playwright test" - OUTPUT=$(DEBUG=pw:api npx playwright test -c . failing.spec.js || true) + OUTPUT=$(DEBUG=pw:api npx playwright test -c . failing.spec.js 2>&1 || true) if [[ "${OUTPUT}" != *"expect.toHaveText started"* ]]; then echo "ERROR: missing 'expect.toHaveText started' in the output" exit 1 diff --git a/packages/playwright-test/src/reporters/list.ts b/packages/playwright-test/src/reporters/list.ts index eebc4e2b79..20e4d7dfcb 100644 --- a/packages/playwright-test/src/reporters/list.ts +++ b/packages/playwright-test/src/reporters/list.ts @@ -67,7 +67,7 @@ class ListReporter extends BaseReporter { override onStdErr(chunk: string | Buffer, test?: TestCase, result?: TestResult) { super.onStdErr(chunk, test, result); - this._dumpToStdio(test, chunk, process.stdout); + this._dumpToStdio(test, chunk, process.stderr); } onStepBegin(test: TestCase, result: TestResult, step: TestStep) {