I have briefly reviewed tests. https://github.com/dbpedia/databus/tree/master/server/app/test
Looks already pretty good, but I got a few comments on that.
I think using test frameworks is generally a very good practice, as they not only help to write test more easily, but also simplify separation of the test code from the production (not sure how it is done in databus atm):
https://blog.logrocket.com/comparing-best-node-js-unit-testing-frameworks/
maybe you could consult with Jan which framework is better to use in node.js.
Some more comments:
- single action = one test with description (no long tests with lots of different function calls)
- code should not contain commented out long parts of code (that is universal for tests and for production code)
I have briefly reviewed tests. https://github.com/dbpedia/databus/tree/master/server/app/test
Looks already pretty good, but I got a few comments on that.
I think using test frameworks is generally a very good practice, as they not only help to write test more easily, but also simplify separation of the test code from the production (not sure how it is done in databus atm):
https://blog.logrocket.com/comparing-best-node-js-unit-testing-frameworks/
maybe you could consult with Jan which framework is better to use in node.js.
Some more comments: