Example projectsλ︎
- TDD Kata: Recent Song-list - simple tests examples
- Codewars: Rock Paper Scissors (lizard spock) solution -
and
examples - practicalli/numbers-to-words - overly verbose example, ripe for refactor
- practicalli/codewars-guides - deps.edn projects
- practicalli/exercism-clojure-guides - Leiningen projects
Sean Corfield - user managerλ︎
User manager has unit tests that also include an embedded database. Tests can run with the Cognitect Labs test runner.
:test
alias includes the test path and a dependency for the H2 database
Cognitect Labs test runner included in the project deps.edn
file as :runner
clojure -M:test:runner
will run the Cognitect Labs runner and include the dependency to run the in-memory database used for the tests.
Using koacha with Sean Corfield user managerλ︎
Adding a test.edn
file is not sufficient for testing this project with lambdaisland/kaocha, as the H2 dependency is also needed.
Create a bin/koacha
script and add the extra alias
Status Monitorλ︎
Status monitor is a Leiningen project.
Include a :kaocha
profile in the project.clj
file, adding the koacha dependency. The :kaocha
alias sets the main namespace and uses the kaocha profile.
{:dev {:dependencies [[javax.servlet/servlet-api "2.5"]
[ring/ring-mock "0.3.2"]]}
:kaocha {:dependencies [[lambdaisland/kaocha "1.0.632"]]}}
:aliases {"kaocha" ["with-profile" "+kaocha" "run" "-m" "kaocha.runner"]}
lein kaocha
will run all the tests