https://cypress.io logo
Hi, I'm trying to implement an after-test hook by ...
# e2e-testing
d
Hi, I'm trying to implement an after-test hook by listening on
test:after:run
events. I want to report some data after each and every test, and send it via HTTP to another server. However, it seems like the event handler gets cut-off immediately, before the request can be be completed, and the next test beings to run. How can I make the event listener wait until the request is done, and only then return? It seems like the common Node practices of async/await or even the classic then/catch logic on promises don't have any effect. Thanks.