Fork me on GitHub
#fulcro
<
2018-07-15
>
currentoor20:07:07

@tony.kay how do you usually test backend queries/mutations? I was thinking i could put all the logic in helper functions then test those

currentoor20:07:45

i was wondering if you had any built in support for that? i know only mutations can be intern’ed

currentoor21:07:51

or i suppose i could invoke the multimethod that dispatches to them

tony.kay22:07:18

no built-in support really. As a general rule I find that tests are best with the least amount of entangled stuff...unfortunately, in a dynamic language that means I don't get the "you glued them together reasonably" test of a static type system. Clojure specs help, but I still struggle to get the same quality of test suite in Clojure as I do in Java.

tony.kay22:07:14

but I write a ton less code...so there's that

tony.kay22:07:21

for queries/mutations: I prefer helpers that can be tested...even better if you can isolate the I/O layer from the actual entry point, but sometimes that feels pretty contrived

👍 4