In Jest how to dynamically generate tests based on the API call response

Viewed 217

I want to generate tests on the fly by getting the json including array of data from an API indicating what should I do in each test and how many tests I need to do. I tried to put the fetch part in "beforeAll" but anyway it is not working because jest wants all tests (it) at execution time.

0 Answers
Related