DEV Community

Discussion on: Where Should Tests Live?

Collapse
 
snarkypenguin profile image
snarkypenguin

I am working mainly in scheme these days, and I include testing code in the source files. This serves several purposes: it makes it quite easy to check that changes to code don't have unintended consequences, it provides in situ examples of the tested uses of the code, and the tests throughout the code can be incorporated into more complex testing routines.

Personally, I like to keep the code and its tests close together: Keep your friends close, but keep your rivals closer ;-)