I would appreciate any help on this: https://stackoverflow.com/questions/76782305/mochajs-test-keep-running-when-using-async-await
#mochajs #nodejs #express #async
(if you don't call your API/DB sync way, #mochajs will not wait till the request is finished, meaning test results will not be stored.)
disclaimer: maybe it still works on different envs than darwin (macs) but not based on what I was reading... 🤷♂️
Now, why is there still a use case for needing sync code execution (instead of async)? Well, many reasons, like writing a custom #mochajs runner (@Cypress_io@twitter.com uses mocha as well) where you need to send results to any database a the end of the test run - basic use case.