superagent-mocker
superagent-mocker copied to clipboard
Mocking for the `field` method of superagent
This is just a first step in implementation of mocking of the field function (see docs). This function is very useful when you are trying to send multipart form.
I just want to know, whether such improvements are interesting for you (as maintainers and owners)
Required for merge:
- [x] owner approvement
- [ ] tests
- [x] ????
Coverage decreased (-4.9%) to 95.082% when pulling 77116dfc0a36e5817825baade19b3ee0de3dbba3 on maxkoryukov:feature/mock-field-method into 6ff0027011495506d4dfed4ccc28fe1f3cfad4c3 on A:master.
Coverage decreased (-4.9%) to 95.082% when pulling 77116dfc0a36e5817825baade19b3ee0de3dbba3 on maxkoryukov:feature/mock-field-method into 6ff0027011495506d4dfed4ccc28fe1f3cfad4c3 on A:master.
@A, @tbranyen could you take a look at this PR to confirm, that it is useful. If yes - I will add tests and will check for a unmock (I am not sure, how new feature works with mock reset)
And a question about design: should field-method save params to the body or not?
I think it can be useful. But it's better to ask @tbranyen because he is the maintainer now. I believe him)
I'll look it over asap!
Looks good to me. Seems useful!
I will add tests;)
sorry... only on the next week but we are using your package for testing, so I am forced to make this PR merge-able ;)