I want to generate it() tests in a loop, but the data required to drive the loop needs to be retrieved asynchronously first. I've tried solving the problem using before() but it won't work. The code below retrieves and displays the parameters in the loop correctly but... the it() tests don't get executed. It's as if mocha ignores it() that appear AFTER waiting on a promise.
describe('Generated tests', async () => {
const testParams = await <asynchronous call here>
testParams.forEach(testParam=> {
console.log(testParam)
it(`Generated test for ${testParam}, () => myTestFunc(testParam))
})
})