Olical / cljs-test-runner

Discover and run your ClojureScript tests
https://clojars.org/olical/cljs-test-runner
The Unlicense
85 stars 16 forks source link

No test execution if :advanced and no runner out dir #30

Closed mfikes closed 5 years ago

mfikes commented 5 years ago

If you don't yet have a cljs-test-runner-out dir, and you run tests with :advanced, then no tests are run.

Repro:

test/foo/core_test.cljs:

(ns foo.core-test
  (:require [clojure.test :refer [deftest is]]))

(deftest sample-test
  (is (== 1 1)))

deps.edn:

{:deps {org.clojure/clojurescript {:mvn/version "1.10.520"}}
 :aliases {:test {:extra-deps  {olical/cljs-test-runner {:mvn/version "3.5.0"}}
                  :extra-paths ["test" "cljs-test-runner-out/gen"]
                  :main-opts   ["-m" "cljs-test-runner.main"]}}}

Then running the tests produces no output:

$ clojure -A:test -c '{:optimizations :advanced}'

Running them a second time will:

$ clojure -A:test -c '{:optimizations :advanced}'

Testing foo.core-test

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.
Olical commented 5 years ago

I'm afraid this is a known gotcha :sob: if you have any tips then I'd love to hear them!