cenfun / monocart-reporter

A playwright test reporter (Node.js)
https://cenfun.github.io/monocart-reporter/
MIT License
207 stars 12 forks source link

Question: is onEnd() hook invoked after the playwright global teardown function or before? #98

Closed stevez closed 8 months ago

stevez commented 8 months ago

It is important to make sure onEnd is called after the global teardown, how can we prove that?

cenfun commented 8 months ago

The Monocart onEnd is called after the Playwright cutsom reporter onEnd, see https://playwright.dev/docs/api/class-reporter#reporter-on-end

Called after all tests have been run, or testing has been interrupted.

It should be called after the global teardown, but Im not sure, you can ask the Playwright developers for the answer. https://github.com/microsoft/playwright/issues

stevez commented 8 months ago

Yes, I can confirm it runs after, thanks