jameslnewell / xhr-mock

Utility for mocking XMLHttpRequest.
196 stars 48 forks source link

request body #1

Closed sean-roberts closed 9 years ago

sean-roberts commented 9 years ago

currently, req.body() always returns undefined. I think it's a simple adding of

this.body(xhr.data);

in the MockRequest constructor.

sean-roberts commented 9 years ago

Was going to work on a PR but I am not entirely following how your testing is set up

jameslnewell commented 9 years ago

Thanks for taking the time to report and submit a PR!

I've merged your PR, added mochify to the devDeps and added a scripts.test key to the package.json.

jameslnewell commented 9 years ago

Published in 1.3.2.

sean-roberts commented 9 years ago

Yep np!