Closed ngot closed 4 years ago
Read https://github.com/asos-craigmorten/superdeno/issues/1 again, realized that patch only fixed the error throw, not the empty body.
Hi @ngot I've added a test for this for both Oak and Ako in 1.6.0
.
I believe the issue is that in the sample test you are making a HEAD
request which will discard the body, whereas in your curl
request you are implicitly using a GET
request, so the body is returned.
Test added here: https://github.com/asos-craigmorten/superdeno/blob/main/test/supertest.ako.test.ts#L7 and passing in CICD.
@asos-craigmorten Thanks for the investigation. That's right, I didn't realise I was using the HEAD request. I was definitely too blind to find that.
No worries - thanks for raising anyway! Lead to some extra tests and a small refactor so all good 🎉
Issue
Setup:
When server response 4xx or 5xx, superdeno's response doesn't have body or text, so there is no way to test the HTTP body part.
curl: