this post was submitted on 19 Jul 2025
4 points (100.0% liked)

Clojure

312 readers
1 users here now

Clojure is a dynamic, general-purpose programming language.

Resources:

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] brian@programming.dev 1 points 6 days ago

I'm not sure if I understand why. I like snapshot testing, but I'm not sure what you gain from using this dsl approach instead of a snapshot library and a more typical test framework, but there are some notable downsides:

  • you have to write typical tests in a different place from your snapshot tests. some things are more complex than "this value never changes", you might just care about a property holding, it produces the same value for several different inputs, etc. properly capturing a big for a regression test is more than a snapshot
  • you lose editor tooling, I can't just send tests to the repl from my editor, I don't have autocomplete, etc
  • need edn serializers for all values you care about. seems easy enough to return a host language object without a proper representation
  • may just be me but I'm not a fan of the added levels of nesting