Skip to content

I can't for the life of me figure out how to get tracing to work #30

@saikyun

Description

@saikyun

With this code:

(ns showcase.ghostwheel
  (:require
   [ghostwheel.tracer]
   [ghostwheel.core :as g :refer [>defn | =>]]))

(>defn ^::g/trace ranged-rand
  "I was lifted straight from the clojure.spec guide"
  [start end]
  [int? int? | #(< start end)
   => int? | #(>= % start) #(< % end)]
  (+ start (long (rand (- end start)))))

(g/check)

And the following in my shadow-cljs.edn:

{:compiler-options
  :ghostwheel 
  {:check true 
   :num-tests 10 
   :outstrument true
   :report-output :repl}}

The automatic tests works great! So thanks for that.

However, I can't figure out how to get tracing to work. Am I missing anything?

In the readme, there's an example that looks like this:

(g/check #(foo 2 4))

But when I try similar code, I get a spec error, saying that g/check won't take that input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions