This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (12)
- # babashka (87)
- # beginners (86)
- # calva (22)
- # circleci (4)
- # clj-kondo (46)
- # cljdoc (6)
- # cljsrn (15)
- # clojure (87)
- # clojure-europe (18)
- # clojure-uk (7)
- # clojurescript (20)
- # community-development (3)
- # conjure (1)
- # cursive (13)
- # datomic (14)
- # events (7)
- # fulcro (27)
- # graphql (31)
- # helix (8)
- # jobs-discuss (1)
- # lsp (43)
- # malli (11)
- # meander (64)
- # off-topic (7)
- # pathom (26)
- # polylith (9)
- # practicalli (2)
- # re-frame (33)
- # reagent (2)
- # reitit (5)
- # releases (2)
- # rewrite-clj (2)
- # shadow-cljs (69)
- # specter (5)
- # sql (1)
- # tools-deps (85)
- # tree-sitter (1)
- # vim (3)
Just published a new version of my library check (https://gitlab.com/mauricioszabo/check). it's basically a library to allow for better testing - it wraps nubank/matcher-combinators and expectations for matchers, allow the user to define "custom matchers", and have a better support for mocks. It's been battle tested for more than a year, by testing Chlorine, Clover, and multiple projects that I've been working in ClojureScript.
But when it really shines, for me, is on asynchronous testing for ClojureScript - it adds the ability to mock async elements, adds a timeout for a test, and teardown. It also does not "fight" against
clojure.test, but on the contrary, it embraces it (so tools like kaocha, devcards, workspaces keep working correctly). Discussions on... #testing channel, maybe?
The syntax reminds me of Midje (unfortunately). I wondered if you had looked at https://github.com/clojure-expectations/clojure-test ?
(right now it only works with self-hosted cljs via Planck but I would love to have it work with more general cljs!)
And yes, I looked at this version of expectations and I want to bring its matchers to check. The reason I didn't use it was mostly because I focused this last version on getting the async tests right - that's something that's really weak on ClojureScript IMHO.
Clj-kondo is back with a brand new feature: macroexpansion (and some other improvements) ✨! https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md#macroexpand This is available in the just released version 2021.07.28! Changelogs: https://github.com/clj-kondo/clj-kondo/blob/master/CHANGELOG.md#20210728 Enjoy.
Clojure CLI https://clojure.org/releases/tools#v22.214.171.1243 is now available. Changes since last stable release:
• If a git library name follows the repo convention names, the
:git/url can now be inferred (`:git/url` can also be specified explicitly and takes precedence)
:git/tag and prefix
:git/sha can now be specified instead of the full sha. Both must point to the same commit.
:sha has been renamed to
:git/sha but the original is still supported for backwards compatibility
:deps/prep-lib - a new top-level key can be used to say how a source lib should be prepared before being added to the classpath. This key’s value is a map with
:ensures. See https://clojure.org/reference/deps_and_cli#prep for more info.
:tools/usage - a new top-level key can be used to provide the
:ns-aliases context for a tool
• https://clojure.org/reference/deps_and_cli#tool_install - git-based programs that can be installed with a local name. Tools can provide their own usage context in deps.edn.
◦ Added new auto-installed tool named
tools with https://clojure.github.io/tools.tools
remove. See https://clojure.org/reference/deps_and_cli#tool_install#.
◦ Install a tool with
clojure -Ttools install <lib> <coord> :as <toolname>
◦ Run a tool with
clojure -T<toolname> fn (also takes -X style args)
-T option is like
-X (executes a function) but does not use the project classpath, instead uses tool classpath (and adds
:paths ["."] by default).
-T:aliases is otherwise same as
-Ttoolname resolves named tool by name and uses that tool lib.
◦ https://clojure.atlassian.net/browse/TDEPS-198 - -X and -T will not wait to exit if futures/agents have been used
◦ https://clojure.atlassian.net/browse/TDEPS-182 - Improve deprecation messages to be more accurate
◦ https://clojure.atlassian.net/browse/TDEPS-183 - Fix -Sdescribe output to be valid EDN on Windows
◦ https://clojure.atlassian.net/browse/TDEPS-179 - Fix incorrect classpath when :classpath-overrides removes path
◦ Delay computation of local-repo path (don’t compute at load time)
◦ Use https://github.com/clojure/tools.deps.alpha/blob/master/CHANGELOG.md 0.12.1003
• New -X:deps programs:
find-versions - to find versions of Maven or git libs or tools
prep - use to https://clojure.org/reference/deps_and_cli#prep source libs
help/dir - to list available functions in a tool namespace
help/doc - to list docs for a tool namespace or function
:git/sha need to be the full one, if
:git/tag is present, or could a short one be used (as mentioned in the clojureD presentation?)