Fork me on GitHub
#kaocha
<
2019-09-16
>
hjrnunes10:09:58

Hi! I'm trying to use kaocha whilst using orchestra to instrument my functions. But when there is a spec problem with :args and :ret, it prints something like

Exception: java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class java.lang.Number
Whereas with clojure.test I get
FATAL: Failed spec:
(2) - failed: vector? in: [3 0] at: [:args :search-params]
Is there any way around this?

plexus11:09:38

do you have a stacktrace for that exception? how/where/when are you calling orchestra?

hjrnunes15:09:10

Hi. Calling orchestra in a namespace with

(ns myapp.test.instrument
  (:require [clojure.test :refer :all]
            [orchestra.spec.test :as st]))

(st/instrument)

hjrnunes16:09:03

It triggers for a :ret spec in an fdef.

plexus09:09:50

@U0LUZHXM2 I would ask in #expound, this seems to be happening on an internal datastructure of expound

hjrnunes10:09:24

Ok, thanks. Is this because Kaocha calls Expound? It doesn't happen with clojure.test