Re:Using Radicle CI
by NewJazz on Wednesday July 23, 2025 @11:27AM
(#44660300)
It is a tradeoff, e.g. running tests with a real database or other supporting service and taking longer vs. mocking things and having a test environment that is less like reality.
[ Parent
| on HN ]
Re:Using Radicle CI
by andrewaylett on Wednesday July 23, 2025 @11:41AM
(#44660477)
https://testcontainers.com/ is not quite the solution to all your problems, but it makes working with real databases and supporting services pretty much as easy as mocking them would be.
I'd really recommend against mocking dependencies for most tests though. Don't mock what you don't own, do make sure you test each abstraction layer appropriately.