This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-07
Channels
- # announcements (4)
- # babashka (20)
- # beginners (167)
- # calva (1)
- # cider (18)
- # circleci (10)
- # clara (45)
- # clojure (85)
- # clojure-argentina (1)
- # clojure-europe (3)
- # clojure-finland (3)
- # clojure-greece (2)
- # clojure-italy (9)
- # clojure-nl (30)
- # clojure-spec (32)
- # clojure-survey (39)
- # clojure-uk (72)
- # clojurescript (12)
- # core-async (4)
- # data-science (3)
- # emacs (10)
- # figwheel-main (9)
- # fulcro (44)
- # graalvm (3)
- # jobs (12)
- # jobs-discuss (6)
- # joker (3)
- # juxt (1)
- # leiningen (4)
- # off-topic (23)
- # planck (5)
- # re-frame (4)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (43)
- # spacemacs (8)
- # test-check (19)
- # tools-deps (21)
Here is an alias I added to the deps.edn of the core.rrb-vector library: https://github.com/clojure/core.rrb-vector/blob/master/deps.edn#L30
I wouldn't be surprised if there are better ways, but that is effective and straightforward
@deleted-user Have you looked at https://github.com/seancorfield/dot-clojure ? That has a lot of stuff that is very helpful when you're getting started with CLI/`deps.edn`
The main opts are round-tripped from shell clojure
into files on disk and then back again into the shell and then to java
.
It’s usually safe to assume these kind of shenanigans when storing shell commands. Nobody does it right.
So the quoting/space combinations break in that round-tripping.
Cognitect's test-runner is in there.
Hence the :test
alias and the :runner
alias.
It’s usually safe to assume these kind of shenanigans when storing shell commands. Nobody does it right.
Well, you can run tests without the test-runner -- clojure.test
does have some basic test running logic -- but you won't have a very nice experience 🙂
clojure.test/run-all-tests
will run all tests that have been loaded (in require
'd code).
I wish there was a note about tests on the deps + cli page on http://clojure.org
if I could trouble you to file an issue so I remember, I'd be happy to do so https://github.com/clojure/clojure-site/issues
All the test runners out there look for "test" files (by various means), load the code, and then run all the tests, under whatever filters you provide.
FWIW, Boot doesn't have a test runner built-in either. Only Leiningen does.
Most of the test runners out there are additional dependencies that offer more features than Leiningen's built-in stuff...
@deleted-user This will probably be helpful for you https://cljdoc.org/d/expectations/clojure-test/1.2.1/doc/getting-started#running-tests
It's under consideration to spin off clojure.test
into a Contrib lib for Clojure 1.11. I've volunteered to maintain it and one of the things I'll do is add a bunch of documentation to the project, that covers how to run tests with a variety of tools, and how to filter tests etc.
Yes, it's for the clojure.test
-compatible version of Expectations that I maintain -- but a lot of what's at that link would become "canon" documentation in clojure.test
, if I get to maintain it.
with-test
is tricky to use because the default setup for all the test runners will not see those tests -- hence my notes about what needs to be done 🙂