Use Promise in mocked data
fdrobidoux opened this issue · comments
Félix Dion-Robidoux commented
I made the mistake of doing this, and it cost me a bunch of time :
mockAxiosAdapter.onGet("/groups")
.replyOnce(200, Promise.resolve(groups));
Could it be possible to resolve Promises in the transformRequest(data)
function in handle_request.js
?
Thanks!
Alex Barbu commented
why you don't await the promises before and add to the mock just the returned data?