4 ms·
ugh I had to do this recently. Per the original author "Writing a unit test involves creating a mock db, http client, http server, and several data objects"...
by retbull 11y ago
ugh I had to do this recently. Per the original author "Writing a unit test involves creating a mock db, http client, http server, and several data objects"... I hurt when I had to write tests for that. It isn't that much better now but I did improve the data objects so they have builders which have sensible defaults.
- mjnaus 11y agoThere are other ways of testing which are more suitable, at least until you get your code base to the point where unit tests can more easily be applied. Smoke tests, functional tests, integration tests, QA, are workable solutions to build an initial testing harness around legacy code.