mtbrault / nextjs-http-supertest

npm package to get an http server parsing your nextJS app to link endpoint with handler
14 stars 5 forks source link

feat: make any internal errors more visible #7

Closed justin-caldicott closed 1 year ago

justin-caldicott commented 1 year ago

Initial attempts at working with the checked out version of this library didn't work, and it wasn't immediately obvious why. Requests would hang, the tests would timeout and there were no errors logged.

After stepping through in the debugger I managed to work it out and have raised an issue for that separately. But it would have been great if any errors like this were more immediately obvious.

For me, these changes cause super test tests to fail fast, with a 500 response code and a helpful message in the body, in addition to logging to console error.

mtbrault commented 1 year ago

Thanks, this is a useful evolution