Fork me on GitHub
#cider
<
2022-08-24
>
apt19:08:48

Hi folks. Is there any cider feature that requires following the convention of adding a -test suffix to unit tests names?

pithyless21:08:37

I'm not aware of cider features that assume the convention -test for deftests. There is an assumption that the namespace ends in -test to automatically infer test namespaces (configurable via https://docs.cider.mx/cider/testing/running_tests.html#test-namespace-naming-convention) and the macros that define tests (configurable via https://docs.cider.mx/cider/testing/running_tests.html#macros-used-to-define-tests)

👍 1
dpsutton19:08:02

most test runners use that as an indicator i think

👍 1
vemv23:08:29

not really, test runners and CIDER look at ^:test metadata, as emitted by deftest and many other popular macros. So you can use whatever you please - I've never seen the opposite being an issue cc/ @U976F1AR2

dpsutton23:08:04

Oh I read that as for the namespaces. Not for the vars

apt02:08:04

Thanks, folks. In this case, any ideas on why there’s this convention of using -test in test vars names? In principle, it would be redundant so I suppose there must be some good reason for it.

bozhidar08:08:18

Just a lot of history. 🙂

bozhidar08:08:05

Plus it sounds a bit more descriptive e.g. `test-this-and-that" or "this-and-that-test".

apt13:08:29

Got it. So it’s for humans, not machines. Not what I expected. Thanks!

👍 1