Fork me on GitHub
#reveal
<
2021-11-08
>
kenny17:11:27

Hi all. I'm hoping to replace my Cursive REPL with Reveal. The one piece that feels missing is clojure.test integration. I rely on Cursive's run test integration and diff viewer for my day-to-day work. I can hook up a keybinding to run a command to just run a particular test, but the output is the basic console print method. How are folks working with clojure.test & Reveal?

vlaaad18:11:45

I considered creating a test runner for Reveal! But that option wasn't very popular in a pool I ran awhile ago: https://twitter.com/v1aaad/status/1451821549833662475?t=LICd_VzFWfeaLwi03nFIvg&amp;s=19

vlaaad19:11:05

I still think the idea is good..

vlaaad19:11:40

The least you can do is to bind clojure.test/*test-out* to *out* when running tests to forward output to Reveal

kenny19:11:50

Ah got it. I'll try that & see how it improves the output. What was your idea for a test runner integration?

vlaaad19:11:19

Something like "test" action on vars/nses

vlaaad19:11:10

That runs tests, accumulates outputs separately per test, displays diffs between expected/actual..

kenny19:11:32

That'd be cool. This is something critical for me to have prior to switching. I'd like to look at implementing this as a library, perhaps this weekend. I'm curious what you thought the var & ns test output might look like?

vlaaad20:11:55

I haven't thought it through, but I imagined something similar to IDEA's test output pane as seen in java projects - a tree of test contexts with progress reports and test output panel that shows output per selected test in a tree

1
kenny20:11:06

Thank you for the quick responses. I'll fiddle with this idea this weekend. Never used cljfx so progress will probably be slow 🙂

👍 1
kenny01:11:36

Still a ways to go, but basic structure is in place. Goal is to copy Cursive's test runner output: https://cursive-ide.com/userguide/testing.html#test-runner

vlaaad08:11:51

Woah, this is awesome!