Closed chrisjarman closed 4 months ago
@chrisjarman Well done ;) for this PR. I finish my work day and I merge it.
It's not a problem if you don't have time to make unit tests, I will do it ;).
Legend, thanks! I need tools like this because, obviously, I don't write enough tests ;)
I finished my day ;). So I'm working to merge it.
For scenario loops we don't need to await result.
But with your PR I found someplace to use async
and await
;) So thank you.
I will publish a new version when it's done.
2.1.2
version is published ;)
The type definitions for
[before|after][Each|All]Scenario
suggest that asynchronous functions are supported (see use ofMaybePromise
), but the test runner doesn't actuallyawait
them.This means asynchronous test setup/teardown doesn't work reliably.
This PR simply adds the necessary
async/await
tweaks to ensure that any asynchronous effect of async before/after hooks are actually completed, before each test run begins.Again, apologies for another proposed patch without test coverage or reproduction steps 😅
I don't have very much time to work around my professional commitments, but I do want to help improve this library. @amiceli, if you're too busy to verify/validate this fix, please bear with me for a couple more days until I'm able to add proper test coverage.