shadow-cljs
shadow-cljs copied to clipboard
Ignoring tests on production builds
We are considering colocating unit tests with the functions that they test (same file instead of a /test directory). During a production build those tests would need to be ignored in the output. Do you know if this is the case, or if that would be a new feature?
By default tests are not included in release builds, except of course for test targets. However, this only really counts the tests (e.g. deftest) themselves, not their "supporting" code. So, I really wouldn't recommend colocating tests in the same file. It is possible and it is probable that :advanced eliminates all unneeded code, but I wouldn't want to rely on that personally.