hippie icon indicating copy to clipboard operation
hippie copied to clipboard

Parsed body isn't available in promise result

Open ikokostya opened this issue 7 years ago • 1 comments

Parsed body isn't available in promise result, because parsed body is passed to end(fn) callback as separated parameter https://github.com/vesln/hippie/blob/34e078903e5909c86b4010165df023d9099d2514/lib/hippie/client.js#L385-L388

E.g. in the following example res.body is always string:

hippie(app)
    .json()
    .get('/')
    .end()
    .then((res) => {
         assert(typeof res.body !== 'string'); 
    });

ikokostya avatar Oct 06 '17 15:10 ikokostya