Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Promise in mocked data #350

Open
fdrobidoux opened this issue Oct 12, 2022 · 1 comment
Open

Use Promise in mocked data #350

fdrobidoux opened this issue Oct 12, 2022 · 1 comment

Comments

@fdrobidoux
Copy link

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!

@ali3nnn
Copy link

ali3nnn commented Jul 25, 2023

why you don't await the promises before and add to the mock just the returned data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants