diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ac480095..15f2d03b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,6 +30,18 @@ GitHub.dart is committed to efficiency as much as possible. If your code is not Pull Request rejections are not a bad thing. It just means you need to fix something. Perhaps it is important to define 'rejection' as it is used in this case. A rejection is when a GitHub.dart committer comments on a Pull Request with a comment like 'rejected due to incorrect formatting'. +## Tests + +To run the complete test suite you will need to install +`octokit/fixtures-server`. + +``` +npm install --global @octokit/fixtures-server +``` + +Tests can be run using `make test`, which will start up a local mock +GitHub and execute tests against it using your localhost port 3000. + ## Contacting Us - IRC: `#directcode on irc.esper.net and irc.freenode.net` diff --git a/lib/src/common/github.dart b/lib/src/common/github.dart index 0aead228..62358bd8 100644 --- a/lib/src/common/github.dart +++ b/lib/src/common/github.dart @@ -433,7 +433,6 @@ class GitHub { /// Internal method to handle status codes /// Never handleStatusCode(http.Response response) { - print(response.body); String? message = ''; List>? errors; if (response.headers['content-type']!.contains('application/json')) { @@ -450,7 +449,7 @@ class GitHub { } } } catch (ex) { - print(ex); + throw UnknownError(this, ex.toString()); } } switch (response.statusCode) {