Closed JustinLivi closed 8 years ago
Hey, @JustinLivi! We could do this, but there might be other approaches. @benesch has a promise-based supertest extension in supertest-as-promised that @shaunc previously wrapped—would something like that suit your needs?
If the exec
/thunk makes better sense for the use-case, it may be better to follow the pattern of extending this package externally rather than changing the API here. This library has mirrored supertest
's continuation-passing API fairly closely (in fact, improving agent support in 'recent' supertest
versions has largely mooted this library's raison d'etre), and departing from it may complicate future compatibility changes.
That being said, I'd be very happy to see this extension working in some form!
I wasn't aware of the existence of either of these modules. supertest-session-as-promised looks exactly like what I need, thanks!
Would you be open to a PR that adds a mongoose-style
exec
method?Usage would look like this: