superagent-mocker
superagent-mocker copied to clipboard
Pretty simple in-browser mocks for CRUD and REST API
Based on http://visionmedia.github.io/superagent/#get-requests I'm providing it a string so i can use the format of `string[]=one&string[]=two&string[]=three`, but when i check `req.query`, it only shows it as `req.query.string[]: three`. Would it...
This is just a first step in implementation of mocking of the `field` function ([see docs](https://visionmedia.github.io/superagent/#multipart-requests)). This function is very useful when you are trying to send multipart form. I...
It's possible to make it work properly via subclassing — #44 — since the `.agent()` method will invoke `superagent.Request`. A quick'n'dirty way of making it sort-of work ([except cookies](https://visionmedia.github.io/superagent/#preserving-cookies)): ```js...
FYI, superagent now supports replacing `superagent.Request` with another class, like this: https://github.com/visionmedia/superagent/blob/b5af0b49741b68f7b2504036466bf2c7bc2f56a4/test/use.js#L51,L61 so you could use as an alternative way of patching it.
This is part of, but not all of, resolving gh-39 --- Superagent allows you to abort requests by using `req.abort()`. The way this usually works is... ``` js const req...
Does this lib allow you to mock abort requests? I have code that allows users to abort their requests. When I swap in this lib in my tests, this lib...
I'm strongly against to modify response object, for 2 reasons: 1. It will conflict with a response object has the same property "status". 2. It calls the `mergeObjects` function which...
I'm using your library in conjunction with `superagent-bluebird-promise`, but it seems not to work for non-200 responses. The following `superagent-bluebird-promise` code ends up causing an error: > Uncaught TypeError: Cannot...
I'm looking at how we can simulate as much as possible what our real/production environment in offline development scenarios. Inline with this, we are fully faking out the server to...
A Data of unemployment rates in Ghana between 2015 and 2020