status-mobile/.clj-kondo
Icaro Motta 563f1c588d
Improve test failure readability (#18049)
Problem: failed equality checks as in "(is (= expected actual))" will give a
single, long line of output that for anything but the simplest data structures
is unreadable by humans, and the output doesn't give a useful diff.

Solution: use library https://github.com/nubank/matcher-combinators and its test
directive "match?" which will pinpoint where two data structures differ. Then,
instead of "(is (= ...", use "(is (match? expected actual)". It works
beautifully.

The library offers other nice matchers, but the majority of the time match? is
sufficient.

Can we use another test runner like Kaocha? kaocha-cljs2
(https://github.com/lambdaisland/kaocha-cljs2) would be able to print better
test errors out of the box, among other features, but I have no clue if it would
work well or at all in our stack (in theory yes, but it's a larger piece of
work).
2023-12-05 17:20:54 -03:00
..
babashka Add custom linter for i18n/label translation keywords (#17610) 2023-10-11 18:53:34 -03:00
metosin/malli Introduce malli library (#17867) 2023-11-18 11:04:48 -03:00
status-im make clj-kondo hook's name match the fully qualified name of the symbol it's linting (#17817) 2023-11-07 07:10:36 +01:00
config.edn Improve test failure readability (#18049) 2023-12-05 17:20:54 -03:00