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
in your case the user list would be rendered by the server and the client wouldn’t care, it would receive a new rendered copy when you changed pages.
it seems like their argument was all just sites that should have been fully static to begin with, and for some reason have made it sound like that’s the main use of SPAs. It’s a silly article and I wouldn’t change anything I’m doing based on it. if your site is a content based site(showing docs/articles/etc.) then you shouldn’t be using an SPA, especially just for page transitions. otherwise you have a valid use for an SPA and should continue regardless of these new APIs