mocks-server / main

Node.js mock server running live, interactive mocks in place of real APIs
https://www.mocks-server.org
Apache License 2.0
281 stars 14 forks source link

Finish TypeScript branch unit tests #499

Open javierbrea opened 1 month ago

javierbrea commented 1 month ago

Unit tests should be completed in the release branch in order to be able to finish the release. The branch has "component" or "functional" tests of each package, but in some packages, such as the "core" one, unit tests were not finished. Old unit tests were deleted because they were completely broken due to the big refactor that was done.

It is desirable to write unit tests also in a "functional", "component" or "acceptance" style, I mean, starting the server programmatically and using its API methods to check real use cases instead of abusing of mocking internal elements. It should be done this way in order to make them more robust, so, in case any other refactor is done, this does not happen again.

The coverage of unit tests should remain very close to 100%, at is previously was. Any exception to this general rule should be explained in the code or in the ignore coverage configuration.