You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! I wanted to ask what the recommended way is for mocking this library or plans for doing so. Because we're using struct fields on client, there doesn't seem to be any easy way to mock the client without using our own transport, which is pretty tedious for tests.
I ended up taking a code generated approach of mocking each Service struct in my library here, by modifying them to be accessed over functions: https://github.com/jaredallard/gitlab. However, I don't think it's super tenable/great for me to manage this longer term, so I'd love to understand what's been thought about before and for the future!
Also, huge kudos/props for all of your work on this ❤️
The text was updated successfully, but these errors were encountered:
Thanks @jaredallard but I don't have a clear vision and/or any plans for supporting mocking at the moment, as I'm super busy and already struggling to keep this package up-to-date as it is 😏
No worries whatsoever. Happy to keep maintaining this on the side until there's more bandwidth! As I'm using this more and more I'll be sure to try to knock out things where I can to help :)
Hey! I wanted to ask what the recommended way is for mocking this library or plans for doing so. Because we're using struct fields on
client
, there doesn't seem to be any easy way to mock the client without using our own transport, which is pretty tedious for tests.I ended up taking a code generated approach of mocking each
Service
struct in my library here, by modifying them to be accessed over functions: https://github.com/jaredallard/gitlab. However, I don't think it's super tenable/great for me to manage this longer term, so I'd love to understand what's been thought about before and for the future!Also, huge kudos/props for all of your work on this ❤️
The text was updated successfully, but these errors were encountered: