See https://github.com/Moya/Moya/issues/541 for a conversation about how to test, specifically around stubbing. We should document the outcomes of that discussions somewhere in the repo.
Specifically this comment makes for a great start for the documentation.
Hi there!
First of all, thanks for all your work on Moya! It is a great framework!
While getting acquainted with the library, I saw there have been a few recurring issues about the testing documentation. I thought I may take a step to help.
I was able to write this article.
Since I'm not that well versed in testing myself, I didn't dare to write it as documentation. So I ended with this informal article. Nevertheless, if you give me some feedback on the technical part, I will be very happy to rewrite it more formally as documentation.
I'm mostly concerned about:
That鈥檚 awesome, thanks so much @fbeeper! Feel free to open a pull request and we can go from there - I am sure it will be greatly appreciated.
Sent with GitHawk
@fbeeper This is awesome! Thanks for writing that article about Moya 馃 I don't think the examples are too simplistic. In fact, I think simple examples help to reduce the complexity of the topic.
Nevertheless, if you give me some feedback on the technical part, I will be very happy to rewrite it more formally as documentation.
You're right, I think Moya documentation should read a bit more formal than that article. I think the stubbing documentation we need would be:
sampleData in TargetTypeendpointSampleResponseClosure and the EndpointSampleResponseThose things should be great! Of course, if you open a PR with a rough draft we can always help you review it 馃槂
Great! Will definitely do it in the next few days!
It took me more than a month rather than days... but made it in the end! Cheers!
Most helpful comment
Hi there!
First of all, thanks for all your work on Moya! It is a great framework!
While getting acquainted with the library, I saw there have been a few recurring issues about the testing documentation. I thought I may take a step to help.
I was able to write this article.
Since I'm not that well versed in testing myself, I didn't dare to write it as documentation. So I ended with this informal article. Nevertheless, if you give me some feedback on the technical part, I will be very happy to rewrite it more formally as documentation.
I'm mostly concerned about: