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

Use mock responses when testing the GitHub data fetching tool #208

Closed
manekenpix opened this issue Nov 15, 2019 · 5 comments · Fixed by #245
Closed

Use mock responses when testing the GitHub data fetching tool #208

manekenpix opened this issue Nov 15, 2019 · 5 comments · Fixed by #245
Assignees
Labels
area: back-end type: enhancement New feature or request type: test Creation and development of test

Comments

@manekenpix
Copy link
Member

manekenpix commented Nov 15, 2019

Currently the test for the tool to fetch data from GitHub's API is not using mock responses, which has the potential to fail (network down, API down, throttling, etc).
It'd be interesting to replace the responses to make sure the tests fail when they have to, and not because of external factors.

@humphd suggested nock, and jest-fetch-mock

@manekenpix manekenpix added type: enhancement New feature or request area: back-end type: test Creation and development of test labels Nov 15, 2019
@manekenpix
Copy link
Member Author

See #210

@c3ho
Copy link
Contributor

c3ho commented Nov 15, 2019

Sorry, did not notice you created this issue. I can close mine if you want!

@manekenpix
Copy link
Member Author

@c3ho I think we should keep both, or if anything yours, mine is too specific.

@manekenpix
Copy link
Member Author

Or you can create an issue specifically for what you were working on. It was feedParser, right?

@c3ho
Copy link
Contributor

c3ho commented Nov 15, 2019

Specifically the unit testing for it. Gotcha, I'll keep mine open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: back-end type: enhancement New feature or request type: test Creation and development of test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants