Add support for enterprise ZenHub, use mocking for tests #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added support for zenhub enterprise. I took the /p1 off the public endpoint in case the api gets extended to p2 in the future, which would leave enterprise users in a bad state (if we had asked them to pass in https://enterprise.zenhub/p1/).
Moved testing to nock. We don't actually test the returns from the public api, so just using nock is as good as what's there. I've put a default config file in to be able to run the tests with nock without needing to set up a config 9F57 file and a public zenhub account. If a config file does exist, it'll use that instead and attempt to connect publicly to run real-world tests. I've abstracted the tests so that we can run the same batch of tests for each connection scenario.