Open positron opened 2 months ago
Do you, after step 2nd, run (reset)
from the REPL?
No. That would probably work too.
If that's the intended workflow feel free to close. It's just not the workflow I'm used to coming from some older clojure projects based on stuartsierra/component.
The thing is that reloading whole project on save might result in REPL lags especially in bigger applications hence proposed approach with reloaded workflow.
Feel free to modify project settings to your need though.
I expected this workflow to work:
(use-fixtures :once (<my-ns>.test-utils/system-fixture))
- it failsEspecially surprising to me because I was changing the code in the
:handler
but even that didn't get updated, because the built reitit API stuff was referencing the old version of that fn. :)I don't think this should be intended behavior. IMHO using a test fixture implies that it is coming up with repeatable, fresh new state every time the fixture is called. To underscore that difference, with this setup there is no difference between
:each
or:once
.Anyway, if this is not intended behavior, it is because of this code:
https://github.com/kit-clj/kit/blob/master/libs/deps-template/resources/io/github/kit_clj/kit/test/clj/test_utils.clj#L12-L16
I changed mine to always call
core/start-app
.