Supertest: Koa support

Created on 16 Jul 2014  路  6Comments  路  Source: visionmedia/supertest

The express support is really nice; being able to run against an app without fixing up a webserver. Could we get this functionality for koa?

Most helpful comment

As always, after further prodding I got my code working;

var req = request(app.listen());

did the trick!

All 6 comments

As always, after further prodding I got my code working;

var req = request(app.listen());

did the trick!

yay!

thanks!

TypeError: app.address is not a function
  at Test.serverAddress (E:\dev\gtfo\node_modules\supertest\lib\test.js:55:18)
  at new Test (E:\dev\gtfo\node_modules\supertest\lib\test.js:36:12)

Using [email protected] with [email protected].
Do I have to pass in app.listen()?

@fritx can you give that a try, that worked in the example above for the other user.

@mikelax yeah it works, but I'm wondering if supertest could improve in this case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rkmax picture rkmax  路  5Comments

nareshbhatia picture nareshbhatia  路  6Comments

mickaeltr picture mickaeltr  路  3Comments

bookercodes picture bookercodes  路  5Comments

nazreen picture nazreen  路  3Comments