@seancorfield I'm back! During your "testing" demo I love that are able to run your tests from your source file and seeing it in Reveal. It was fun seeing @jr0cket's response too.
It seems you are saying you use - t
so it seems to be an editor thing? What exactly does that run? Should I check with my editor tooling or cider tooling (I use a cider nrepl with vim/conjure) to get that setup?
@dharrigan so called standard definition video for YouTube uploads are available straight away. It take several hours to process full HD video of this length. (This is one reason I stream the Practicalli live broadcasts)
Not sure what you mean about - t
?
It sounds like you are saying "I hit the hotkey dash test"
And then you get the results in a Reveal window
"side-running" Is that what these test runners are?
Ah, right. I have three hot keys bound to running tests: * ctrl-; t -- runs just the test under the cursor (i.e., you have your cursor on the name of a test in a test namespace) * ctrl-; x -- runs all tests in the current namespace (so you're editing a test namespace) * ctrl-; X -- runs all tests in the associated test namespace
I think the latter is what you're referring to?
Yep!
So when I go back to my own editor tooling I should be looking for whatever command calls the "associated test namespace"?
The code behind that looks at the current ns, say foo.bar
, and then tries to require foo.bar-test
(and if that fails, it tries foo.bar-expectations
, which is a convention for Expectations users like me), and if the require succeeds, it then runs all the tests in that associated namespace.
I don't know how (or even if) CIDER supports that out of the box -- check its (copious) docs and/or ask in #cider
I would be surprised if CIDER did not support that -- and I would expect Cursive would also support this -- but I don't use CIDER or Cursive.
Will do. Thanks Sean
https://docs.cider.mx/cider/testing/running_tests.html says it will do that association.
If you’re in an implementation namespace (e.g. some.ns), CIDER will try to find a matching test namespace (by default some.ns-test) and run the tests there.
If you’re in something that already looks like a test namespace (e.g. some.ns-test), CIDER will simply run the tests in that namespace.
Ahh, you don't have to look that stuff up for me. ty!
Your question made me curious. Now I know the answer and can respond to others who ask that question 🙂
Looks like my editor tooling does have it built already as well!
So I'm trying to pilfer your reveal extras. I cut your dev.clj
file down to just the install-reveal-extras
function and edited my deps.edn
reveal alias to this:
:reveal {:extra-deps {vlaaad/reveal {:mvn/version "1.1.171"}
nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.5"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:jvm-opts ["-Dvlaaad.reveal.prefs={:font-size,20}"]
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[vlaaad.reveal.nrepl/middleware,cider.nrepl/cider-middleware]"
"-i"
"-f" "rebel-readline.main/-main"
"-e" "(load-file,(str,(System/getProperty,\"user.home\"),\"/.config/clojure/dev.clj\"))"]}
I hope that is readable. But I don't seem to be getting any of those extras that you show in your video.
So I suspect something is being pulled in or added in your start-repl
function for reveal huh?
Ahh yep, "If Reveal is picked, add some custom code to automatically display tap>'d values with metadata and in table view." I will see what I can do to pull that out of there. I'll leave you alone now. Haha. Great video btw!