Fork me on GitHub
#pathom
<
2022-05-20
>
dehli19:05:46

Hi again 👋 In com.wsscode.pathom3.connect.runner-test/check-all-runners I’m seeing that the inclusion of extra keys in a runner’s response doesn’t cause the test to fail. Is this by design? Edit: After exploring a bit more, I see that there are additional keys included in runner’s response (such as entity data) so my hunch is it’s for that.

wilkerlucio22:05:26

yeah, it uses matcher combinators library that does a check that allows for extra keys

wilkerlucio22:05:43

there are ways to make strict, but most of the time its ok to let the extra keys

wilkerlucio22:05:58

the nice thing is that it also allows for predicates in the middle of the structure, things like: {:uuid (random-uuid)} => {:uuid uuid?} are valid check definitions

dehli22:05:34

oh that is cool! i'll have to check out the library.

wilkerlucio22:05:24

happy to see you taking this dive on Pathom code 🙂

😁 1
wilkerlucio22:05:27

I like to use this though another library called check from @U3Y18N0UC: https://gitlab.com/mauricioszabo/check

dehli22:05:28

awesome! will check that out as well. it's fun to see a little more of how all the magic happens with pathom 😄