FjordWardenF
Denoβ€’3y agoβ€’
2 replies
FjordWarden

BDD with async tests

I'd like to run some tests that all call the same helper function that wraps the bdd it function.
Something like this:

describe('why u no work?', async ()=>{
  const test = async (s) => {let r = await Promise.resolve(0); it(s, ()=>assertEquals(0,r))}
  await test('a')
  await test('b')
  await test('c')
})


It works with a non-async version but I'd like to know how to do this in a async way.
Was this page helpful?