You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✖ createHttpProxyServer › proxies HTTP POST request failed with "Do not return promises from tests declared via test.cb(...), > if you want to return a promise simply declare the test via test(...)"
Unhandled Rejection: tests/createHttpProxyServer.js
TypeError: proxyServer is not a function
resolve (/Users/gajus/Documents/dev/applaudience/forward-proxy/src/createHttpProxyServer.js:72:9)
exports.default.options (/Users/gajus/Documents/dev/applaudience/forward-proxy/src/createHttpProxyServer.js:56:12)
Test. (createHttpProxyServer.js:67:5)
Test._ava2.default.cb as fn
I understand what the error is telling me. I don't understand what is this limitation for?
You are using t.end incorrectly. Don't use it as a timeout method (don't use it at all here). Avoid test.cb when returning promises.
The reason is because AVA needs to know when to end the test. You can defer ending a test by returning a promise, or using test.cb / t.end. We don't allow both because that makes the end of the test ambiguous.
I am getting an error:
I understand what the error is telling me. I don't understand what is this limitation for?
Consider this test:
As it is, ava cannot execute this test. I need to rewrite it to:
What is the reason for the limitation?
The text was updated successfully, but these errors were encountered: