Ghostwheel: Hassle-free clojure.spec, side effect detection and evaluation tracing

Just stumbled upon GitHub - gnl/ghostwheel: Hassle-free inline clojure.spec with semi-automatic generative testing and side effect detection and I am so impressed I have to share it!

Instead of

imagine

and other goodies :slight_smile:

6 Likes

I’ve been checking it out as well and it looks pretty interesting, especially the automatic function testing.

How does it distinguishes itself from orchestra?

It seems to do a whole lot more than orchestra, and can use orchestra for instrumentation. The Readme has a pretty good introduction and documentation of the functionality.

(ns test-chamber.one
  #:ghostwheel.core{:check     true
                    :num-tests 10}
  ...)

Never seen this ns syntax, doesn’t seem to work in Clojure. Is this ClojureScript only?

Ghostwheel author here – the syntax is standard Clojure syntax for adding metadata to the namespace via the attr-map? parameter to ns:
https://clojuredocs.org/clojure.core/ns

Should work identically on Clojure and ClojureScript. A reason why it may not is if you’re using Clojure 1.8.0 or older, because this is a namespaced map, support for which was introduced with Clojure 1.9.0.

Using it is not required, but since Ghostwheel uses qualified keywords for its configuration, the alternative would be quite verbose:

{:ghostwheel.core/check     true
 :ghostwheel.core/num-tests 10}

Right on, I’m still on 1.8, so havn’t gotten used to seeing that new syntax.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.