Fork me on GitHub
#kaocha
<
2020-08-07
>
jeremys14:08:57

Hi, I am having an issue with kaocha-cljs. I get an Kaocha ClojureScript client failed connecting bac with {:kaocha.testable/id :unit-cljs, :cljs/repl-env cljs.repl.node/repl-env, :cljs/compiler-options {:target :nodejs}} when trying to run tests. I did npm install ws, clojure, clojurescript, kaocha & kaocha-cljs are in the classpath. My test.edn looks like this:

#kaocha/v1
    {:tests [{:id :unit-clj
              :source-paths ["src"]
              :test-paths ["test"]
              :ns-patterns ["-test$"]}

             {:id :unit-cljs
              :type :kaocha.type/cljs
              :source-paths ["src"]
              :test-paths ["test"]
              :ns-patterns ["-test$"]}]}
 
I am pretty sure I made some dumb mistake somewhere, I just can’t see where. Any ideas?

plexus16:08:15

Hard to tell @jeremys, at first glance that looks ok. Are you a able to get a node repl with cljs.main?

jeremys16:08:36

@plexus Well here is where it gets weird, I started a clojure repl (nrepl + piggiback) and switched to cljs

(ns dev
  (:require
    [cljs.repl.node :as node]
    [cider.piggieback :as piggie]))

(defn start-node-repl []
  (piggie/cljs-repl (node/repl-env)))


(comment
  (start-node-repl))
ran the tests from there. It worked. Then Now if I run the test with kaocha-cljs it works...