bendrucker / ama

Ask me questions about building web applications
MIT License
6 stars 1 forks source link

Favorite Node API testing library #6

Closed demisx closed 9 years ago

demisx commented 9 years ago

Ben, while doing research on available API testing libs, I've narrowed down to these three:

  1. supertest
  2. hippie
  3. request

Wondering if you can recommend a library that worked well for you? I am using Express 4 for the API engine.

bendrucker commented 9 years ago

No rec from me. I use hapi which has a built in mechanism for triggering the routing logic and then directly running through the request pipeline without an actual socket. You also get to peek at the object passed to reply and not just its serialized form. Then I just make the assertions on the response object directly.