Closed
Description
I want to create helper, which will wait for execution plan or throw an error on timeout. This will reduce boilerplate required for clean test functions.
Example:
test('some test', async t => {
t.plan(3)
...
// lots of async stuff
...
await myHelper(t, 3000) // will wait 3 seconds and throw `Planned for 3 assertions, but got 2`
})
- Is there any workaround to get current execution plan in test? I couldn't find it :(
- What about proposal
t.planWait(3000)