There is a way to create dynamic Tests on Jest based on a ASYNC function for example?
This code run without any error, but test('dynamic test') does not run, even it the conditional is true
var formObject;
describe('test1',()=>{
beforeAll(() => {
return promise().then(
data => {
formObject=retrieved_data;
}
);
})
test('test1',()=>{
expect ...
})
test('test2',()=>{
expect ...
})
if(some conditional based on formObject){
test('dinamic test',()=>{
expect ...
})
}
})
Aucun commentaire:
Enregistrer un commentaire