A
A
Artem Lipatov2019-09-26 19:42:41
Software testing
Artem Lipatov, 2019-09-26 19:42:41

How to properly build backend testing on node.js?

Hey!
I am writing a rest api on a node. The backend accesses several databases, everything works in docker-compose. I want to cover api with tests, which, preferably, would access the server from a separate container. Among the tests will be testing authorization that works through cookies.
What is the best way to organize testing? What libraries to use?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2019-09-26
@Rendalf

npm i superagent

Z
Zhasulan Baigozha, 2019-09-26
@baygozha

Try Gulp, grunt
Throw the tester on the deploy, it will be even better)
You can also add a timeout so that the test does not survive
the server This is how it was on an old project.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question