Open mxschmitt opened 1 year ago
This is because reporter (in this case, list reporter) is not aware of the terminal output produced by global teardown, and so this output is overridden with the test epilogue.
A solution would be to capture all output in the main process, but then all reporters should use a real output method instead of the captured one, which is not backwards compatible.
Running global setup/teardown in a separate process would also help, but we already do that for dependencies, so seems like not worth it.
The problem is not unique to global teardown - we found out that line
reporter can clear the last line of our reporter's output, in case the line reporter gets used after ours.
Repro:
inside the
examples/todomvc
project:npx playwright test --reporter=html
.Expected: We see the console.log of global teardown. Actual: We don't.
When setting this to true it works: https://github.com/microsoft/playwright/blob/5821c547aacfd542259c8a9707b1eee119f0b692/packages/playwright-test/src/reporters/html.ts#L63-L65