Fork me on GitHub
#pathom
<
2022-08-18
>
Joel18:08:27

What is a good way to test with pathom? I’m thinking using resolvers that return dummy data or generated data, and then test queries against that. Or, is there a better way to inject testing facilities?

sheluchin10:08:19

You can call resolvers as regular functions and test them as you would normal functions. https://pathom3.wsscode.com/docs/resolvers/#invoking-resolvers

wilkerlucio14:08:39

for isolated tests calling the resolvers directly is a good way to go

wilkerlucio14:08:05

I personally prefer more integration style tests, so you can emulate the situations your app needs, going over the whole pathom process thing

1