kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
richiardiandrea 2021-05-06T18:29:32.072300Z

Hi there, if I wanted to bootstrap a docker container for every suite would this work?

:kaocha/pre-load-test [com.cohesic.acuity.test/sql-test-container-start-hook]
          :kaocha/pre-test [com.cohesic.acuity.test/reset-script-run-each-leaf-hook]
          :kaocha/post-load-test [com.cohesic.acuity.test/sql-test-container-stop-hook]
I am using hierarchy/suite? for filter but I was wondering if the :pre-load-test is a good hook. I am on 1.0.726 at the moment.

richiardiandrea 2021-05-07T16:13:30.078100Z

@plexus How do you recommend checking if a test suite is "skipped"

richiardiandrea 2021-05-07T16:13:39.078300Z

is there an api for that?

richiardiandrea 2021-05-06T21:50:24.072400Z

asking because (kaocha.hierarchy/leaf? testable) was returning false all the time I basically have to use (= (:kaocha.testable/type testable) :kaocha.type/var) with

:kaocha.hooks/pre-test [com.cohesic.acuity.test/sql-test-container-start-hook
                                  com.cohesic.acuity.test/run-setup-script-each-test-hook]
          :kaocha.hooks/post-test [com.cohesic.acuity.test/run-drop-script-each-test-hook
                                   com.cohesic.acuity.test/sql-test-container-stop-hook]

richiardiandrea 2021-05-06T21:50:33.072600Z

actually, no that does not work either

richiardiandrea 2021-05-06T23:46:22.072800Z

maybe I am misunderstanding something but if I call

clojure -M:test -m kaocha.runner unit --watch
I would expect to see only the :kaocha.testable/id :unit in the hook, is that a wrong assumption? I see all the suites passed in and I cannot differentiate which one is being run right now