superagent-mocker icon indicating copy to clipboard operation
superagent-mocker copied to clipboard

Mocking for the `field` method of superagent

Open maxkoryukov opened this issue 8 years ago • 8 comments
trafficstars

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] ????

maxkoryukov avatar Feb 11 '17 13:02 maxkoryukov

Coverage Status

Coverage decreased (-4.9%) to 95.082% when pulling 77116dfc0a36e5817825baade19b3ee0de3dbba3 on maxkoryukov:feature/mock-field-method into 6ff0027011495506d4dfed4ccc28fe1f3cfad4c3 on A:master.

coveralls avatar Feb 11 '17 13:02 coveralls

Coverage Status

Coverage decreased (-4.9%) to 95.082% when pulling 77116dfc0a36e5817825baade19b3ee0de3dbba3 on maxkoryukov:feature/mock-field-method into 6ff0027011495506d4dfed4ccc28fe1f3cfad4c3 on A:master.

coveralls avatar Feb 11 '17 13:02 coveralls

@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?

maxkoryukov avatar Feb 13 '17 19:02 maxkoryukov

I think it can be useful. But it's better to ask @tbranyen because he is the maintainer now. I believe him)

A avatar Feb 14 '17 05:02 A

I'll look it over asap!

tbranyen avatar Feb 14 '17 17:02 tbranyen

Looks good to me. Seems useful!

tbranyen avatar Feb 14 '17 17:02 tbranyen

I will add tests;)

maxkoryukov avatar Feb 14 '17 18:02 maxkoryukov

sorry... only on the next week but we are using your package for testing, so I am forced to make this PR merge-able ;)

maxkoryukov avatar Feb 17 '17 23:02 maxkoryukov