lein-midje + midje seems to support also running plain clojure.test tests. However, it looks like it only scans .clj files for namespaces containing tests. Are .cljc files intentionally skipped?
there is https://github.com/marick/Midje/issues/339 and https://github.com/marick/Midje/issues/442 that talk about it a bit. Pretty unlikely I'll dive into it though. Happy to review and do a release for a patch that fixes it 🙂
yeah, I found those two. I tried browsing through the midje code base but couldn't really find where the clojure.test tests are handled, just in case there's an easy fix to be found.
maybe midje.data.project-state/namespaces is what finds all the files to process
midje.emission.clojure-test-facade handles the clojure.test stuff, but that doesn't matter here because it is more about what files are chosen to be processed
(haven't looked at the code in years, so just quick guesses after some grepping)
https://github.com/marick/Midje/blob/bee206983db22c6dc92044fd7b5b0365bbd44fc6/src/midje/util/bultitude.clj#L118 looks promising
as one of the issues mentions, it might be tricky to handle the clj/cljs reader macro things. Midje has many layers of macros for processing stuff and so if it doesn't just work to feed it cljc files you may find yourself lost in a deep forest of macros 🙂
macros, macros everywhere 🧑🚀
on the other hand, I'm not really trying to teach midje to fully support .cljc.
The story here is that we have several hundreds of test namespaces; a mix of maybe 75% midje and the rest are plain clojure.test. Within the clojure.test tests there are a bunch of .cljc tests. I had assumed that lein-midje would also run the .cljc clojure.test tests, but was surprised to find out our unit tests were ignoring them.
I understand that midje itself doesn't explicitly support .cljc and I wouldn't expect that (fact ... -stuff would work in e.g. cljs, but I would still assume that clojure.test tests in .cljc would be executed just fine.