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
#9 made breaking changes, but all the tests passed
The approach I've taken so far was to test all my own code but inject stubs that mock out the external interactions and then check the mocks were called with the right params.
Then this update came along and all the tests passed, because my tests were checking that my client.repos mock was getting called with the right arguments. The fact that the upstream library now exposed that object on client.rest.repos was irrelevant because under test a mock still existed for client.repos 🙃
I guess the next step to try on this journey is to find a solution that uses something like nock to fake the github responses so you're still making real calls to octokit, but it is receiving fake pre-canned HTTP responses instead of actually communicating with GitHub. Then you've hopefully got an integration test that fails on breaking changes to the octokit lib.
The text was updated successfully, but these errors were encountered:
#9 made breaking changes, but all the tests passed
The approach I've taken so far was to test all my own code but inject stubs that mock out the external interactions and then check the mocks were called with the right params.
Then this update came along and all the tests passed, because my tests were checking that my
client.repos
mock was getting called with the right arguments. The fact that the upstream library now exposed that object onclient.rest.repos
was irrelevant because under test a mock still existed forclient.repos
🙃I guess the next step to try on this journey is to find a solution that uses something like nock to fake the github responses so you're still making real calls to octokit, but it is receiving fake pre-canned HTTP responses instead of actually communicating with GitHub. Then you've hopefully got an integration test that fails on breaking changes to the octokit lib.
The text was updated successfully, but these errors were encountered: