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

Break functions into two functions for better testing #35

Closed
ewang2002 opened this issue May 6, 2023 · 0 comments · Fixed by #36
Closed

Break functions into two functions for better testing #35

ewang2002 opened this issue May 6, 2023 · 0 comments · Fixed by #36

Comments

@ewang2002
Copy link
Member

For testing purposes, it might be a good idea to break each function responsible for calling into a different endpoint into two functions:

  • a function that takes a JSON string and parses it and returns it, and
  • a function that makes the API call and gets a JSON string (and calls the function mentioned above).

Then, the idea is that our 2nd function can call the 1st function w/ the JSON string, but we can also call the 1st function with our own string for testing purposes.

@ewang2002 ewang2002 linked a pull request Jun 14, 2023 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

1 participant