status-react/.clj-kondo
Icaro Motta 60ad7c8a29
chore(tests): New match-strict? cljs.test directive (#20825)
Equality checks in tests using = give a bad experience by default on test
failures containing nested data structures. We use the cljs.test directive
match? from matcher-combinators library to help compare nested structures. The
problem with match? is that its default matcher for maps (embeds) can be too
permissive, and this causes surprises.

Here we upgrade matcher-combinators to latest, where a new matcher called
nested-equals is available. This matcher won't allow extra keys in maps. This
matcher eliminates the need for manually adding nested equals matchers as we
have to do currently.

- Upgrades matcher-combinators from 3.8.8 to 3.9.1 (latest as of 2024-07-19)

What changes?

When asserting in tests, we now have the option to use match-strict? or match?.
Both directives are available by integrating with cljs.test. The code
implementing the new match-strict? directive was 100% copied from the library
matcher-combinators because we need to wrap the expected value ourselves with
matcher-combinators.matchers/nested-equals. It's ugly code, but it's how we can
integrate with cljs.test/assert-expr.
2024-07-24 23:06:41 -03:00
..
babashka Add custom linter for i18n/label translation keywords (#17610) 2023-10-11 18:53:34 -03:00
funcool/promesa Add Promesa to simplify working with promises (#18767) 2024-03-04 13:59:52 +02:00
metosin/malli Introduce malli library (#17867) 2023-11-18 11:04:48 -03:00
nubank/matcher-combinators Add missing clj-kondo linter for nubank/matcher-combinators (#18091) 2023-12-06 13:39:47 -03:00
rewrite-clj/rewrite-clj Wallet: select-send-address event (#18501) 2024-01-15 20:21:38 +04:00
status-im Add linter for inconsistent deftest name (#20224) 2024-06-03 19:10:36 -03:00
taoensso/encore Wallet: select-send-address event (#18501) 2024-01-15 20:21:38 +04:00
config.edn chore(tests): New match-strict? cljs.test directive (#20825) 2024-07-24 23:06:41 -03:00