Closed protoEvangelion closed 6 years ago
@jwu910 any thoughts?
Is there a way to test w/o needing the testing environment variable?
Not that I am aware of unless you can think of something else. I have seen NODE_ENV
commonly set to development
production
testing
in node projects.
:tada: This PR is included in version 1.13.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Following Octokit/rest.js pattern: https://github.com/octokit/rest.js/blob/master/test/integration/pagination-test.js
They have written a very helpful testing package that intercepts requests and provides mock responses: https://github.com/octokit/fixtures
This is useful so we don't have to rely on the GitHub api being up or down.
The downside is the scenarios they have only cover a couple of ways that we are using the GitHub API. They make adding new scenarios a fairly simple process, but one of the options will require opening a new PR on their repo.
The other option, would be to use their https://github.com/octokit/fixtures-server package to generate our own scenarios and store them in our repo. This would add complexity but offer more flexibility.
Here is a good overview on how fixtures work: https://github.com/octokit/fixtures/blob/master/HOW_IT_WORKS.md
Does this seem like a worthwhile path to pursue?