This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-29
Channels
- # announcements (7)
- # babashka (36)
- # beginners (67)
- # braveandtrue (11)
- # cider (8)
- # clojure (52)
- # clojure-conj (4)
- # clojure-poland (1)
- # clojure-spec (9)
- # clojure-uk (8)
- # clojurescript (42)
- # core-typed (11)
- # cursive (4)
- # emacs (1)
- # fulcro (1)
- # graalvm (24)
- # hoplon (10)
- # hyperfiddle (1)
- # off-topic (30)
- # re-frame (7)
- # reitit (1)
- # sql (1)
Yes, I’ve already said earlier this week that I want to port clojure.test, but that will take some time
@deleted-user Added a test library for babashka: https://github.com/borkdude/spartan.test
@borkdude, maybe you should change your tagline to “we are borkdude, we create awesome tools” because I can’t imagine there is only one of you!
Made the output more like normal clojure.test:
FAIL in project.test/foo-test
expected: (= 2 (project/foo))
actual: (not (= 2 1))
Now I can finally test this giant babashka script... https://github.com/borkdude/deps.clj
@deleted-user Where do you see a mistake in the README?
deps.clj is just a text file that you can run with either clojure or babashka whereas deps.exe is a binary file
cool, can you make an issue for it? (adding more to it as you discover more, is fine)
bonus feature of the testing lib:
WARNING: no assertions were made in test borkdude.deps-test/describe-test
@deleted-user This works:
(require '[ :as io])
(defmacro ^:private predicate [s path]
`(if ~path
(~(symbol (str "." s)) ~path)
false))
(defn absolute?
"Return true if `path` is absolute."
[path]
(predicate isAbsolute (io/file path)))
(prn (absolute? "README.md"))
Kind of meta: deps.clj / deps.exe now uses itself in the tests to build the classpath with a testing library on it and then invokes clojure or babashka to run them
there are some zip-related classes in bb: https://github.com/borkdude/babashka/blob/0a35971acac25e84cfb2a6fbbd8e8193345b76b2/src/babashka/impl/classes.clj#L78
this was added for clj-http-lite, because it needs to handle gzip compression I think