C
C
Coder3212017-01-11 00:02:20
JavaScript
Coder321, 2017-01-11 00:02:20

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

4 answer(s)
F
FoxInSox, 2017-01-11
@FoxInSox

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.

E
Evgeny Kozinchenko, 2017-01-11
@inerc

I would suggest using Mocha, lib for node. A very handy thing. Here are examples.
https://habrahabr.ru/post/162555/

I
intvar, 2017-01-11
@intvar

Look towards mocha, chai. You can use supertest to call the rest api. In more complex cases, mockery, sinon help.

R
Rossomah, 2017-02-16
@Rossomah

+ istanbul to evaluate code coverage with tests

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question