dbpedia / databus

A digital factory platform for managing files online with stable IDs, high-quality metadata, powerful API and tools for building on data: find, access, make interoperable, re-use
Apache License 2.0
41 stars 17 forks source link

API tests discussion :) #51

Open manonthegithub opened 1 year ago

manonthegithub commented 1 year ago

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:

manonthegithub commented 1 year ago

For the release I would definitely at least rearrange tests with a test framework

kurzum commented 1 year ago

Clarify when the current tests are actually executed. Next time we extend tests, we will refactor the testing framework.

holycrab13 commented 1 year ago

Refactoring our tests to be executed in the context of a framework is a good idea. Should be fairly easy to transform the current "assert" setup to somthing like Jest (https://jestjs.io/docs/getting-started)