supertest-test2doc
A supertest extension to make life easier with test2doc.js.
Usage
npm install --save-dev supertest test2doc supertest-test2doc
Simple use const request = require('supertest-test2doc')(require('supertest'))
and request(app).with(doc)
and then you no longer need to write doc.get/post/put/delete/query/resBody...
.
E.g.
const doc = const request = // For Koa, you should exports app.listen() or app.callback() in your app entryconst app = doc
You can find more examples here.
License
The project is released under MIT License.