brash-plumber-51185
03/03/2023, 10:21 AMjs
describe("fetch data and create tests", () => {
const fetchData = async () => {
const res = fetch(myUrl)
const data = res.json()
// map to array
return data
}
fetchData().then(data =>
it(`Test ${data}`, () => {
// expect something
})
)}
})
The issue is that the tests never runs.
I've tried moving the fetching logic inside before with no luck.
I'm really out of options here.
How do I accomplish this?gray-kilobyte-89541
03/03/2023, 11:33 AMbrash-plumber-51185
03/03/2023, 11:39 AMgray-kilobyte-89541
03/03/2023, 11:42 AMbrash-plumber-51185
03/03/2023, 11:44 AMbrash-plumber-51185
03/03/2023, 11:45 AMgray-kilobyte-89541
03/03/2023, 12:39 PMbrash-plumber-51185
03/03/2023, 1:03 PMgray-kilobyte-89541
03/03/2023, 2:47 PMgray-kilobyte-89541
03/03/2023, 7:20 PMbrash-plumber-51185
03/06/2023, 9:46 AMgray-kilobyte-89541
03/06/2023, 1:01 PM