Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to access outside of nock #408

Closed
jasonkuhrt opened this issue Apr 23, 2021 · 6 comments
Closed

Ability to access outside of nock #408

jasonkuhrt opened this issue Apr 23, 2021 · 6 comments

Comments

@jasonkuhrt
Copy link

We're writing E2E tests that mock the GH API. We have separate processes for all parts of the stack and just feed a URL to the app to a fake GH API. It would be great if fixtures from here we usable for this. The problem with nock is that it assumes the tests and the thing under test are running in the same process.

@gr2m
Copy link
Contributor

gr2m commented Apr 23, 2021

we also have a standalone binary: https://github.com/octokit/fixtures-server

@gr2m gr2m added the support label Apr 23, 2021
@jasonkuhrt
Copy link
Author

Oh that looks very interesting, thanks. I think we were kind of going to reinvent this so great to know about it now!

@gr2m
Copy link
Contributor

gr2m commented Apr 24, 2021

I’d also be open to add more fixtures/scenarios, or come up with a way to easily record and use your own fixtures. It’s something I had in mind for a while, but waiting for someone to collaborate on it who would use it themselves for production projects

@jasonkuhrt
Copy link
Author

At Prisma we're just transitioning toward mocking gh API for our testing, but as we get more into it, we'll let you know any feedback we have!

@gr2m
Copy link
Contributor

gr2m commented Apr 25, 2021

sounds great, please keep me posted 👍🏼 The aspect that I'm most interested in is to keep your http mocks up-to-date, that's what we do with the fixtures in this repository. They get re-recorded every night, and if any changes occur we get a pull request. There were a few accidental breaking changes we caught and reported to GitHub that way, but mostly its changes in headers and additional properties. In order to compare new fixtures to existing ones they need to be normalized, and we put a lot of work into that already, and can expand it if you would like to use that functionality for your fixtures, too

@gr2m
Copy link
Contributor

gr2m commented May 28, 2021

I'll close the issue because there is nothing actionable left to do. Feel free to continue to comment if you have any follow up questions or ideas

@gr2m gr2m closed this as completed May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants