Jest Spy not detecting asynchronous function call despite being called
I am testing a function using Jest that calls an asynchronous function. The function seems to be called as verified by console logs, but Jest’s spy is not detecting the call. Here are the relevant code snippets: