Answer the question
In order to leave comments, you need to log in
How and with what to test node?
Never thought about writing tests before. But now the time has come. Tell the noob how and how to test rest-api on node? What can you read or watch?
Answer the question
In order to leave comments, you need to log in
1. google: test node api
2. first links:
https://scotch.io/tutorials/test-a-node-restful-ap...
https://strongloop.com/strongblog/how-to-test- an-a...
https://developers.redhat.com/blog/2016/03/15/test...
It's time to try Google.
I would suggest using Mocha, lib for node. A very handy thing. Here are examples.
https://habrahabr.ru/post/162555/
Look towards mocha, chai. You can use supertest to call the rest api. In more complex cases, mockery, sinon help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question