-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run rcf tests in a polylith project? #62
Comments
So, after some discussions and investigations, I found out the following: https://clojurians.slack.com/archives/C013B7MQHJQ/p1661457088307879 . We can use test setup and tear-down to call (ns foo.test-setup
(:require [hyperfiddle.rcf]))
(defn setup
"Enable rcf tests https://github.com/hyperfiddle/rcf#usage"
[project-name]
(println "Setup hyperfiddle.rcf in project" project-name)
(hyperfiddle.rcf/enable!)) in
Unfortunately, this does not work for tests under Trying to figure out why. |
So in polylith, test runner (polylith-kaocha) only considers files that end with _test . and only under test/ . |
Polylith projects can run RCF tests normally, but they require passing the JVM option In normal projects, this means adding :aliases {
:poly {:main-opts ["-m" "polylith.clj.core.poly-cli.core"]
;; REDACTED
:jvm-opts ["-Dhyperfiddle.rcf.generate-tests=true"]
:extra-deps {polylith/clj-poly REDACTED
polylith-kaocha/test-runner REDACTED }} |
See https://github.com/ieugen/poly-rcf as well. For src/ tests we need to add |
Thanks @ieugen your solution works on my project! |
I would like to run rcf tests (from my
src/
directories) of polylith bricks.I run tests with
clojure -Srepro -M:poly test
.Right now tests are not run, probably because the
(hyperfiddle.rcf/enable!)
is not run fromdevelopment/src/user.clj
https://polylith.gitbook.io/poly/workflow/testing
I will probably create+link this to the polylith project so we can figure out and document this feature.
The text was updated successfully, but these errors were encountered: