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

WIP: resolve gh-39

Open jamesplease opened this issue 9 years ago • 2 comments

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...

const req = superagent
   .get()
   .whatevs()
   .end();

// later on..
req.abort()

superagent-mocker doesn't return this from its mocked end, so this adds that back in. However, req.abort doesn't seem to be working, so I'm still investigating that.

jamesplease avatar Oct 20 '16 01:10 jamesplease

Coverage Status

Coverage remained the same at 100.0% when pulling 20de1e3bd526dc05d16a229066a470050fbda28e on jmeas:patch-1 into e42c9043e72aa420bca0514feb77e8fc1840cd6a on A:master.

coveralls avatar Oct 20 '16 01:10 coveralls

This will require more work, but...I'm surprised this lib doesn't support this! Aborting requests is pretty important. @A, any clues as to the changes required to make this lib work with aborting?

jamesplease avatar Oct 20 '16 02:10 jamesplease