ghostwheel

Hassle-free clojure.spec, automatic generative testing, side effect detection, and evaluation tracing for Clojure(-Script) – https://github.com/gnl/ghostwheel
gnl 2018-08-18T08:44:31.000100Z

@danielgrosse Yup, ::g/check will be a bit better documented soon to make it clear that it just generates the per-function code for gen-testing and side effect detection, while (g/check) runs it + does the coverage checks and potentially post-check callbacks.

gnl 2018-08-19T18:13:48.000100Z

@danielgrosse The tests are regular Clojure deftest tests, so you can run them any way you like. However at the moment Ghostwheel's fancy custom reporter only works in the browser, so if you run them somewhere else the error messages may not be quite as nice. Fixing that is on the roadmap.

danielgrosse 2018-08-19T19:26:40.000100Z

Thank you for the answer. Unfortunately the anchor of the link is not existing.

gnl 2018-08-19T20:28:45.000100Z

Huh, yeah, for some reason the anchor only seems to work if the page is already open.

danielgrosse 2018-08-18T09:34:52.000100Z

Are the tests only runnable in the browser, or can I also run them in the terminal? Like Clojure test

Sen 2018-08-18T15:26:24.000100Z

So I added two functions from the docs:

(>defn foo
       [coll n]
       [(spec/coll-of int? :kind vector?) int?
        => seq?]
       (map n coll))

(>defn addition
       [a b]
       [pos-int? pos-int? => int? | #(> % a) #(> % b)]
       (+ a b))
Both should pass, but they fail with empty error message:

Sen 2018-08-18T15:26:58.000100Z

Is there something I'm missing?

Sen 2018-08-18T17:26:07.000100Z

Also, it might be related, when I want to run ghostwheel in another namespace by adding everything needed such as

(::g/check true)
(::g/num-tests 5)
;; my tests
(g/check)
somehow it is not detected by browser console, and nothing happens, though figwheel reloads page and raises errors if any.

Sen 2018-08-18T17:27:54.000100Z

I tried running it both in Spacemacs with cider and running figwheel from terminal, no difference, if that matters

Sen 2018-08-18T17:32:42.000100Z

I tried (clean-builds) with no success

Sen 2018-08-18T17:34:16.000100Z

I'm using ghostwheel in app based on https://github.com/Day8/re-frame-template