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

Missing async/await in chapter6/5_web_sockets_and_http_requests/1_http_request #29

Open
akaigyouhou opened this issue Jul 26, 2022 · 0 comments

Comments

@akaigyouhou
Copy link

I think there maybe some problem after you add fetch in addItem function in inventoryController.js for tests involving HTTP requests.
I got the error that the nock mock is not received request. And finally I think the problem is because you add a fetch in addItem function, but forgot to change the function to some async/await. But here is a problem, if you change the addItem function to async/await, the main.test.js will also be broken. And I am also not sure whether it's necessary to write some loop to to catch the fireEvent result after change the addItem function.

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

1 participant