Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
@alloy => Initial work on turning on OHHTTP stubs only #575
The aim of this PR was to initially build out
The problem lay in that it was difficult to loop back from the Exception raised by the networking API to the bit of code that caused it. I concluded that this wasn't going to be fun, and wouldn't make life easier in the future, which was the entire point.
So I started wondering what it would take to use some of the techniques I requested in Moya within Eigen. The notable one being stubs as first class citizens. We now have synchronous networking in tests.
You can now determine exactly what test is making what networking request. Note this only affects things going through the API.
The API client will log out example OHHTTP code if you don't have a stub for some networking that happens inside the app. I opted against making it an exception, it's really obvious when you see it.
Oh yeah, epic win
One thing you could do is in the printed message include a function that people can break on, like is done with unsatisfiable AutoLayout constraints.