From b1d8f97b022a25c53fd3b974be3f7537b08b76bf Mon Sep 17 00:00:00 2001 From: Daniel Bayerlein Date: Thu, 16 Feb 2017 19:44:09 +0100 Subject: [PATCH] Tests expanded, thx @chrishelgert --- __mocks__/result.json | 896 ++++++++++++++++++++++++++++++++++++++++ __tests__/github.js | 103 ++++- __tests__/index.test.js | 6 +- __tests__/zazu.test.js | 4 +- 4 files changed, 1001 insertions(+), 8 deletions(-) create mode 100644 __mocks__/result.json diff --git a/__mocks__/result.json b/__mocks__/result.json new file mode 100644 index 0000000..9eda09b --- /dev/null +++ b/__mocks__/result.json @@ -0,0 +1,896 @@ +{ + "total_count": 376, + "incomplete_results": false, + "items": [ + { + "id": 5171172, + "name": "honeycomb", + "full_name": "altamiracorp/honeycomb", + "owner": { + "login": "altamiracorp", + "id": 51468, + "avatar_url": "https://avatars.githubusercontent.com/u/51468?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/altamiracorp", + "html_url": "https://github.com/altamiracorp", + "followers_url": "https://api.github.com/users/altamiracorp/followers", + "following_url": "https://api.github.com/users/altamiracorp/following{/other_user}", + "gists_url": "https://api.github.com/users/altamiracorp/gists{/gist_id}", + "starred_url": "https://api.github.com/users/altamiracorp/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/altamiracorp/subscriptions", + "organizations_url": "https://api.github.com/users/altamiracorp/orgs", + "repos_url": "https://api.github.com/users/altamiracorp/repos", + "events_url": "https://api.github.com/users/altamiracorp/events{/privacy}", + "received_events_url": "https://api.github.com/users/altamiracorp/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/altamiracorp/honeycomb", + "description": "MySql storage engine for the cloud", + "fork": false, + "url": "https://api.github.com/repos/altamiracorp/honeycomb", + "forks_url": "https://api.github.com/repos/altamiracorp/honeycomb/forks", + "keys_url": "https://api.github.com/repos/altamiracorp/honeycomb/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/altamiracorp/honeycomb/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/altamiracorp/honeycomb/teams", + "hooks_url": "https://api.github.com/repos/altamiracorp/honeycomb/hooks", + "issue_events_url": "https://api.github.com/repos/altamiracorp/honeycomb/issues/events{/number}", + "events_url": "https://api.github.com/repos/altamiracorp/honeycomb/events", + "assignees_url": "https://api.github.com/repos/altamiracorp/honeycomb/assignees{/user}", + "branches_url": "https://api.github.com/repos/altamiracorp/honeycomb/branches{/branch}", + "tags_url": "https://api.github.com/repos/altamiracorp/honeycomb/tags", + "blobs_url": "https://api.github.com/repos/altamiracorp/honeycomb/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/altamiracorp/honeycomb/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/altamiracorp/honeycomb/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/altamiracorp/honeycomb/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/altamiracorp/honeycomb/statuses/{sha}", + "languages_url": "https://api.github.com/repos/altamiracorp/honeycomb/languages", + "stargazers_url": "https://api.github.com/repos/altamiracorp/honeycomb/stargazers", + "contributors_url": "https://api.github.com/repos/altamiracorp/honeycomb/contributors", + "subscribers_url": "https://api.github.com/repos/altamiracorp/honeycomb/subscribers", + "subscription_url": "https://api.github.com/repos/altamiracorp/honeycomb/subscription", + "commits_url": "https://api.github.com/repos/altamiracorp/honeycomb/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/altamiracorp/honeycomb/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/altamiracorp/honeycomb/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/altamiracorp/honeycomb/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/altamiracorp/honeycomb/contents/{+path}", + "compare_url": "https://api.github.com/repos/altamiracorp/honeycomb/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/altamiracorp/honeycomb/merges", + "archive_url": "https://api.github.com/repos/altamiracorp/honeycomb/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/altamiracorp/honeycomb/downloads", + "issues_url": "https://api.github.com/repos/altamiracorp/honeycomb/issues{/number}", + "pulls_url": "https://api.github.com/repos/altamiracorp/honeycomb/pulls{/number}", + "milestones_url": "https://api.github.com/repos/altamiracorp/honeycomb/milestones{/number}", + "notifications_url": "https://api.github.com/repos/altamiracorp/honeycomb/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/altamiracorp/honeycomb/labels{/name}", + "releases_url": "https://api.github.com/repos/altamiracorp/honeycomb/releases{/id}", + "deployments_url": "https://api.github.com/repos/altamiracorp/honeycomb/deployments", + "created_at": "2012-07-24T20:58:57Z", + "updated_at": "2017-01-23T07:20:51Z", + "pushed_at": "2014-03-14T15:05:51Z", + "git_url": "git://github.com/altamiracorp/honeycomb.git", + "ssh_url": "git@github.com:altamiracorp/honeycomb.git", + "clone_url": "https://github.com/altamiracorp/honeycomb.git", + "svn_url": "https://github.com/altamiracorp/honeycomb", + "homepage": null, + "size": 164956, + "stargazers_count": 71, + "watchers_count": 71, + "language": "Java", + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 20, + "mirror_url": null, + "open_issues_count": 45, + "forks": 20, + "open_issues": 45, + "watchers": 71, + "default_branch": "master", + "score": 67.79534 + }, + { + "id": 123624, + "name": "honeycomb", + "full_name": "davetroy/honeycomb", + "owner": { + "login": "davetroy", + "id": 11199, + "avatar_url": "https://avatars.githubusercontent.com/u/11199?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/davetroy", + "html_url": "https://github.com/davetroy", + "followers_url": "https://api.github.com/users/davetroy/followers", + "following_url": "https://api.github.com/users/davetroy/following{/other_user}", + "gists_url": "https://api.github.com/users/davetroy/gists{/gist_id}", + "starred_url": "https://api.github.com/users/davetroy/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/davetroy/subscriptions", + "organizations_url": "https://api.github.com/users/davetroy/orgs", + "repos_url": "https://api.github.com/users/davetroy/repos", + "events_url": "https://api.github.com/users/davetroy/events{/privacy}", + "received_events_url": "https://api.github.com/users/davetroy/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/davetroy/honeycomb", + "description": "Tracks DHCP leases and allows users to claim devices and tie them to an individual user and then track usage", + "fork": false, + "url": "https://api.github.com/repos/davetroy/honeycomb", + "forks_url": "https://api.github.com/repos/davetroy/honeycomb/forks", + "keys_url": "https://api.github.com/repos/davetroy/honeycomb/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/davetroy/honeycomb/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/davetroy/honeycomb/teams", + "hooks_url": "https://api.github.com/repos/davetroy/honeycomb/hooks", + "issue_events_url": "https://api.github.com/repos/davetroy/honeycomb/issues/events{/number}", + "events_url": "https://api.github.com/repos/davetroy/honeycomb/events", + "assignees_url": "https://api.github.com/repos/davetroy/honeycomb/assignees{/user}", + "branches_url": "https://api.github.com/repos/davetroy/honeycomb/branches{/branch}", + "tags_url": "https://api.github.com/repos/davetroy/honeycomb/tags", + "blobs_url": "https://api.github.com/repos/davetroy/honeycomb/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/davetroy/honeycomb/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/davetroy/honeycomb/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/davetroy/honeycomb/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/davetroy/honeycomb/statuses/{sha}", + "languages_url": "https://api.github.com/repos/davetroy/honeycomb/languages", + "stargazers_url": "https://api.github.com/repos/davetroy/honeycomb/stargazers", + "contributors_url": "https://api.github.com/repos/davetroy/honeycomb/contributors", + "subscribers_url": "https://api.github.com/repos/davetroy/honeycomb/subscribers", + "subscription_url": "https://api.github.com/repos/davetroy/honeycomb/subscription", + "commits_url": "https://api.github.com/repos/davetroy/honeycomb/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/davetroy/honeycomb/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/davetroy/honeycomb/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/davetroy/honeycomb/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/davetroy/honeycomb/contents/{+path}", + "compare_url": "https://api.github.com/repos/davetroy/honeycomb/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/davetroy/honeycomb/merges", + "archive_url": "https://api.github.com/repos/davetroy/honeycomb/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/davetroy/honeycomb/downloads", + "issues_url": "https://api.github.com/repos/davetroy/honeycomb/issues{/number}", + "pulls_url": "https://api.github.com/repos/davetroy/honeycomb/pulls{/number}", + "milestones_url": "https://api.github.com/repos/davetroy/honeycomb/milestones{/number}", + "notifications_url": "https://api.github.com/repos/davetroy/honeycomb/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/davetroy/honeycomb/labels{/name}", + "releases_url": "https://api.github.com/repos/davetroy/honeycomb/releases{/id}", + "deployments_url": "https://api.github.com/repos/davetroy/honeycomb/deployments", + "created_at": "2009-02-07T06:53:46Z", + "updated_at": "2016-05-09T01:25:45Z", + "pushed_at": "2011-02-06T15:47:08Z", + "git_url": "git://github.com/davetroy/honeycomb.git", + "ssh_url": "git@github.com:davetroy/honeycomb.git", + "clone_url": "https://github.com/davetroy/honeycomb.git", + "svn_url": "https://github.com/davetroy/honeycomb", + "homepage": "http://beehivebaltimore.org", + "size": 8551, + "stargazers_count": 16, + "watchers_count": 16, + "language": "Ruby", + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 6, + "mirror_url": null, + "open_issues_count": 0, + "forks": 6, + "open_issues": 0, + "watchers": 16, + "default_branch": "master", + "score": 47.925564 + }, + { + "id": 40477450, + "name": "HoneycombView", + "full_name": "suzuki-0000/HoneycombView", + "owner": { + "login": "suzuki-0000", + "id": 1096585, + "avatar_url": "https://avatars.githubusercontent.com/u/1096585?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/suzuki-0000", + "html_url": "https://github.com/suzuki-0000", + "followers_url": "https://api.github.com/users/suzuki-0000/followers", + "following_url": "https://api.github.com/users/suzuki-0000/following{/other_user}", + "gists_url": "https://api.github.com/users/suzuki-0000/gists{/gist_id}", + "starred_url": "https://api.github.com/users/suzuki-0000/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/suzuki-0000/subscriptions", + "organizations_url": "https://api.github.com/users/suzuki-0000/orgs", + "repos_url": "https://api.github.com/users/suzuki-0000/repos", + "events_url": "https://api.github.com/users/suzuki-0000/events{/privacy}", + "received_events_url": "https://api.github.com/users/suzuki-0000/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/suzuki-0000/HoneycombView", + "description": "HoneycombView is the iOS UIView for displaying like Honeycomb layout written by swift ", + "fork": false, + "url": "https://api.github.com/repos/suzuki-0000/HoneycombView", + "forks_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/forks", + "keys_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/teams", + "hooks_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/hooks", + "issue_events_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/issues/events{/number}", + "events_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/events", + "assignees_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/assignees{/user}", + "branches_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/branches{/branch}", + "tags_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/tags", + "blobs_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/statuses/{sha}", + "languages_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/languages", + "stargazers_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/stargazers", + "contributors_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/contributors", + "subscribers_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/subscribers", + "subscription_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/subscription", + "commits_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/contents/{+path}", + "compare_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/merges", + "archive_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/downloads", + "issues_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/issues{/number}", + "pulls_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/pulls{/number}", + "milestones_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/milestones{/number}", + "notifications_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/labels{/name}", + "releases_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/releases{/id}", + "deployments_url": "https://api.github.com/repos/suzuki-0000/HoneycombView/deployments", + "created_at": "2015-08-10T10:45:15Z", + "updated_at": "2017-02-16T13:47:00Z", + "pushed_at": "2016-03-23T01:31:48Z", + "git_url": "git://github.com/suzuki-0000/HoneycombView.git", + "ssh_url": "git@github.com:suzuki-0000/HoneycombView.git", + "clone_url": "https://github.com/suzuki-0000/HoneycombView.git", + "svn_url": "https://github.com/suzuki-0000/HoneycombView", + "homepage": "", + "size": 13339, + "stargazers_count": 177, + "watchers_count": 177, + "language": "Swift", + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 19, + "mirror_url": null, + "open_issues_count": 1, + "forks": 19, + "open_issues": 1, + "watchers": 177, + "default_branch": "master", + "score": 37.77806 + }, + { + "id": 20739749, + "name": "honeycombs", + "full_name": "thijskempke/honeycombs", + "owner": { + "login": "thijskempke", + "id": 7162261, + "avatar_url": "https://avatars.githubusercontent.com/u/7162261?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/thijskempke", + "html_url": "https://github.com/thijskempke", + "followers_url": "https://api.github.com/users/thijskempke/followers", + "following_url": "https://api.github.com/users/thijskempke/following{/other_user}", + "gists_url": "https://api.github.com/users/thijskempke/gists{/gist_id}", + "starred_url": "https://api.github.com/users/thijskempke/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/thijskempke/subscriptions", + "organizations_url": "https://api.github.com/users/thijskempke/orgs", + "repos_url": "https://api.github.com/users/thijskempke/repos", + "events_url": "https://api.github.com/users/thijskempke/events{/privacy}", + "received_events_url": "https://api.github.com/users/thijskempke/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/thijskempke/honeycombs", + "description": "jQuery plugin for displaying images in a responsive honeycomb grid with caption support", + "fork": false, + "url": "https://api.github.com/repos/thijskempke/honeycombs", + "forks_url": "https://api.github.com/repos/thijskempke/honeycombs/forks", + "keys_url": "https://api.github.com/repos/thijskempke/honeycombs/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/thijskempke/honeycombs/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/thijskempke/honeycombs/teams", + "hooks_url": "https://api.github.com/repos/thijskempke/honeycombs/hooks", + "issue_events_url": "https://api.github.com/repos/thijskempke/honeycombs/issues/events{/number}", + "events_url": "https://api.github.com/repos/thijskempke/honeycombs/events", + "assignees_url": "https://api.github.com/repos/thijskempke/honeycombs/assignees{/user}", + "branches_url": "https://api.github.com/repos/thijskempke/honeycombs/branches{/branch}", + "tags_url": "https://api.github.com/repos/thijskempke/honeycombs/tags", + "blobs_url": "https://api.github.com/repos/thijskempke/honeycombs/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/thijskempke/honeycombs/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/thijskempke/honeycombs/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/thijskempke/honeycombs/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/thijskempke/honeycombs/statuses/{sha}", + "languages_url": "https://api.github.com/repos/thijskempke/honeycombs/languages", + "stargazers_url": "https://api.github.com/repos/thijskempke/honeycombs/stargazers", + "contributors_url": "https://api.github.com/repos/thijskempke/honeycombs/contributors", + "subscribers_url": "https://api.github.com/repos/thijskempke/honeycombs/subscribers", + "subscription_url": "https://api.github.com/repos/thijskempke/honeycombs/subscription", + "commits_url": "https://api.github.com/repos/thijskempke/honeycombs/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/thijskempke/honeycombs/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/thijskempke/honeycombs/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/thijskempke/honeycombs/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/thijskempke/honeycombs/contents/{+path}", + "compare_url": "https://api.github.com/repos/thijskempke/honeycombs/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/thijskempke/honeycombs/merges", + "archive_url": "https://api.github.com/repos/thijskempke/honeycombs/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/thijskempke/honeycombs/downloads", + "issues_url": "https://api.github.com/repos/thijskempke/honeycombs/issues{/number}", + "pulls_url": "https://api.github.com/repos/thijskempke/honeycombs/pulls{/number}", + "milestones_url": "https://api.github.com/repos/thijskempke/honeycombs/milestones{/number}", + "notifications_url": "https://api.github.com/repos/thijskempke/honeycombs/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/thijskempke/honeycombs/labels{/name}", + "releases_url": "https://api.github.com/repos/thijskempke/honeycombs/releases{/id}", + "deployments_url": "https://api.github.com/repos/thijskempke/honeycombs/deployments", + "created_at": "2014-06-11T20:17:50Z", + "updated_at": "2016-12-20T15:25:45Z", + "pushed_at": "2014-05-01T10:47:34Z", + "git_url": "git://github.com/thijskempke/honeycombs.git", + "ssh_url": "git@github.com:thijskempke/honeycombs.git", + "clone_url": "https://github.com/thijskempke/honeycombs.git", + "svn_url": "https://github.com/thijskempke/honeycombs", + "homepage": null, + "size": 917, + "stargazers_count": 6, + "watchers_count": 6, + "language": "JavaScript", + "has_issues": false, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 28, + "mirror_url": null, + "open_issues_count": 0, + "forks": 28, + "open_issues": 0, + "watchers": 6, + "default_branch": "master", + "score": 35.272472 + }, + { + "id": 20374040, + "name": "Honeycomb", + "full_name": "Qarterd/Honeycomb", + "owner": { + "login": "Qarterd", + "id": 575662, + "avatar_url": "https://avatars.githubusercontent.com/u/575662?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/Qarterd", + "html_url": "https://github.com/Qarterd", + "followers_url": "https://api.github.com/users/Qarterd/followers", + "following_url": "https://api.github.com/users/Qarterd/following{/other_user}", + "gists_url": "https://api.github.com/users/Qarterd/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Qarterd/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Qarterd/subscriptions", + "organizations_url": "https://api.github.com/users/Qarterd/orgs", + "repos_url": "https://api.github.com/users/Qarterd/repos", + "events_url": "https://api.github.com/users/Qarterd/events{/privacy}", + "received_events_url": "https://api.github.com/users/Qarterd/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/Qarterd/Honeycomb", + "description": "Component-Model Framework in C++", + "fork": false, + "url": "https://api.github.com/repos/Qarterd/Honeycomb", + "forks_url": "https://api.github.com/repos/Qarterd/Honeycomb/forks", + "keys_url": "https://api.github.com/repos/Qarterd/Honeycomb/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Qarterd/Honeycomb/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Qarterd/Honeycomb/teams", + "hooks_url": "https://api.github.com/repos/Qarterd/Honeycomb/hooks", + "issue_events_url": "https://api.github.com/repos/Qarterd/Honeycomb/issues/events{/number}", + "events_url": "https://api.github.com/repos/Qarterd/Honeycomb/events", + "assignees_url": "https://api.github.com/repos/Qarterd/Honeycomb/assignees{/user}", + "branches_url": "https://api.github.com/repos/Qarterd/Honeycomb/branches{/branch}", + "tags_url": "https://api.github.com/repos/Qarterd/Honeycomb/tags", + "blobs_url": "https://api.github.com/repos/Qarterd/Honeycomb/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Qarterd/Honeycomb/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Qarterd/Honeycomb/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Qarterd/Honeycomb/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Qarterd/Honeycomb/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Qarterd/Honeycomb/languages", + "stargazers_url": "https://api.github.com/repos/Qarterd/Honeycomb/stargazers", + "contributors_url": "https://api.github.com/repos/Qarterd/Honeycomb/contributors", + "subscribers_url": "https://api.github.com/repos/Qarterd/Honeycomb/subscribers", + "subscription_url": "https://api.github.com/repos/Qarterd/Honeycomb/subscription", + "commits_url": "https://api.github.com/repos/Qarterd/Honeycomb/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Qarterd/Honeycomb/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Qarterd/Honeycomb/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Qarterd/Honeycomb/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Qarterd/Honeycomb/contents/{+path}", + "compare_url": "https://api.github.com/repos/Qarterd/Honeycomb/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Qarterd/Honeycomb/merges", + "archive_url": "https://api.github.com/repos/Qarterd/Honeycomb/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Qarterd/Honeycomb/downloads", + "issues_url": "https://api.github.com/repos/Qarterd/Honeycomb/issues{/number}", + "pulls_url": "https://api.github.com/repos/Qarterd/Honeycomb/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Qarterd/Honeycomb/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Qarterd/Honeycomb/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Qarterd/Honeycomb/labels{/name}", + "releases_url": "https://api.github.com/repos/Qarterd/Honeycomb/releases{/id}", + "deployments_url": "https://api.github.com/repos/Qarterd/Honeycomb/deployments", + "created_at": "2014-06-01T09:08:28Z", + "updated_at": "2017-02-10T02:34:44Z", + "pushed_at": "2015-11-03T07:47:42Z", + "git_url": "git://github.com/Qarterd/Honeycomb.git", + "ssh_url": "git@github.com:Qarterd/Honeycomb.git", + "clone_url": "https://github.com/Qarterd/Honeycomb.git", + "svn_url": "https://github.com/Qarterd/Honeycomb", + "homepage": "", + "size": 90938, + "stargazers_count": 14, + "watchers_count": 14, + "language": "C++", + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 2, + "mirror_url": null, + "open_issues_count": 0, + "forks": 2, + "open_issues": 0, + "watchers": 14, + "default_branch": "master", + "score": 33.259216 + }, + { + "id": 38025954, + "name": "HoneyComb", + "full_name": "lijiaocn/HoneyComb", + "owner": { + "login": "lijiaocn", + "id": 6396775, + "avatar_url": "https://avatars.githubusercontent.com/u/6396775?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/lijiaocn", + "html_url": "https://github.com/lijiaocn", + "followers_url": "https://api.github.com/users/lijiaocn/followers", + "following_url": "https://api.github.com/users/lijiaocn/following{/other_user}", + "gists_url": "https://api.github.com/users/lijiaocn/gists{/gist_id}", + "starred_url": "https://api.github.com/users/lijiaocn/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/lijiaocn/subscriptions", + "organizations_url": "https://api.github.com/users/lijiaocn/orgs", + "repos_url": "https://api.github.com/users/lijiaocn/repos", + "events_url": "https://api.github.com/users/lijiaocn/events{/privacy}", + "received_events_url": "https://api.github.com/users/lijiaocn/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/lijiaocn/HoneyComb", + "description": "简便、高效的Kubernetes部署系统。", + "fork": false, + "url": "https://api.github.com/repos/lijiaocn/HoneyComb", + "forks_url": "https://api.github.com/repos/lijiaocn/HoneyComb/forks", + "keys_url": "https://api.github.com/repos/lijiaocn/HoneyComb/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/lijiaocn/HoneyComb/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/lijiaocn/HoneyComb/teams", + "hooks_url": "https://api.github.com/repos/lijiaocn/HoneyComb/hooks", + "issue_events_url": "https://api.github.com/repos/lijiaocn/HoneyComb/issues/events{/number}", + "events_url": "https://api.github.com/repos/lijiaocn/HoneyComb/events", + "assignees_url": "https://api.github.com/repos/lijiaocn/HoneyComb/assignees{/user}", + "branches_url": "https://api.github.com/repos/lijiaocn/HoneyComb/branches{/branch}", + "tags_url": "https://api.github.com/repos/lijiaocn/HoneyComb/tags", + "blobs_url": "https://api.github.com/repos/lijiaocn/HoneyComb/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/lijiaocn/HoneyComb/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/lijiaocn/HoneyComb/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/lijiaocn/HoneyComb/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/lijiaocn/HoneyComb/statuses/{sha}", + "languages_url": "https://api.github.com/repos/lijiaocn/HoneyComb/languages", + "stargazers_url": "https://api.github.com/repos/lijiaocn/HoneyComb/stargazers", + "contributors_url": "https://api.github.com/repos/lijiaocn/HoneyComb/contributors", + "subscribers_url": "https://api.github.com/repos/lijiaocn/HoneyComb/subscribers", + "subscription_url": "https://api.github.com/repos/lijiaocn/HoneyComb/subscription", + "commits_url": "https://api.github.com/repos/lijiaocn/HoneyComb/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/lijiaocn/HoneyComb/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/lijiaocn/HoneyComb/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/lijiaocn/HoneyComb/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/lijiaocn/HoneyComb/contents/{+path}", + "compare_url": "https://api.github.com/repos/lijiaocn/HoneyComb/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/lijiaocn/HoneyComb/merges", + "archive_url": "https://api.github.com/repos/lijiaocn/HoneyComb/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/lijiaocn/HoneyComb/downloads", + "issues_url": "https://api.github.com/repos/lijiaocn/HoneyComb/issues{/number}", + "pulls_url": "https://api.github.com/repos/lijiaocn/HoneyComb/pulls{/number}", + "milestones_url": "https://api.github.com/repos/lijiaocn/HoneyComb/milestones{/number}", + "notifications_url": "https://api.github.com/repos/lijiaocn/HoneyComb/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/lijiaocn/HoneyComb/labels{/name}", + "releases_url": "https://api.github.com/repos/lijiaocn/HoneyComb/releases{/id}", + "deployments_url": "https://api.github.com/repos/lijiaocn/HoneyComb/deployments", + "created_at": "2015-06-25T03:35:38Z", + "updated_at": "2016-11-15T07:00:52Z", + "pushed_at": "2016-04-15T13:38:26Z", + "git_url": "git://github.com/lijiaocn/HoneyComb.git", + "ssh_url": "git@github.com:lijiaocn/HoneyComb.git", + "clone_url": "https://github.com/lijiaocn/HoneyComb.git", + "svn_url": "https://github.com/lijiaocn/HoneyComb", + "homepage": null, + "size": 1935, + "stargazers_count": 11, + "watchers_count": 11, + "language": "Shell", + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "open_issues_count": 0, + "forks": 2, + "open_issues": 0, + "watchers": 11, + "default_branch": "master", + "score": 32.03235 + }, + { + "id": 472780, + "name": "honeycomb", + "full_name": "elambert/honeycomb", + "owner": { + "login": "elambert", + "id": 28866, + "avatar_url": "https://avatars.githubusercontent.com/u/28866?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/elambert", + "html_url": "https://github.com/elambert", + "followers_url": "https://api.github.com/users/elambert/followers", + "following_url": "https://api.github.com/users/elambert/following{/other_user}", + "gists_url": "https://api.github.com/users/elambert/gists{/gist_id}", + "starred_url": "https://api.github.com/users/elambert/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/elambert/subscriptions", + "organizations_url": "https://api.github.com/users/elambert/orgs", + "repos_url": "https://api.github.com/users/elambert/repos", + "events_url": "https://api.github.com/users/elambert/events{/privacy}", + "received_events_url": "https://api.github.com/users/elambert/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/elambert/honeycomb", + "description": "Project Honeycomb", + "fork": false, + "url": "https://api.github.com/repos/elambert/honeycomb", + "forks_url": "https://api.github.com/repos/elambert/honeycomb/forks", + "keys_url": "https://api.github.com/repos/elambert/honeycomb/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/elambert/honeycomb/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/elambert/honeycomb/teams", + "hooks_url": "https://api.github.com/repos/elambert/honeycomb/hooks", + "issue_events_url": "https://api.github.com/repos/elambert/honeycomb/issues/events{/number}", + "events_url": "https://api.github.com/repos/elambert/honeycomb/events", + "assignees_url": "https://api.github.com/repos/elambert/honeycomb/assignees{/user}", + "branches_url": "https://api.github.com/repos/elambert/honeycomb/branches{/branch}", + "tags_url": "https://api.github.com/repos/elambert/honeycomb/tags", + "blobs_url": "https://api.github.com/repos/elambert/honeycomb/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/elambert/honeycomb/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/elambert/honeycomb/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/elambert/honeycomb/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/elambert/honeycomb/statuses/{sha}", + "languages_url": "https://api.github.com/repos/elambert/honeycomb/languages", + "stargazers_url": "https://api.github.com/repos/elambert/honeycomb/stargazers", + "contributors_url": "https://api.github.com/repos/elambert/honeycomb/contributors", + "subscribers_url": "https://api.github.com/repos/elambert/honeycomb/subscribers", + "subscription_url": "https://api.github.com/repos/elambert/honeycomb/subscription", + "commits_url": "https://api.github.com/repos/elambert/honeycomb/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/elambert/honeycomb/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/elambert/honeycomb/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/elambert/honeycomb/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/elambert/honeycomb/contents/{+path}", + "compare_url": "https://api.github.com/repos/elambert/honeycomb/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/elambert/honeycomb/merges", + "archive_url": "https://api.github.com/repos/elambert/honeycomb/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/elambert/honeycomb/downloads", + "issues_url": "https://api.github.com/repos/elambert/honeycomb/issues{/number}", + "pulls_url": "https://api.github.com/repos/elambert/honeycomb/pulls{/number}", + "milestones_url": "https://api.github.com/repos/elambert/honeycomb/milestones{/number}", + "notifications_url": "https://api.github.com/repos/elambert/honeycomb/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/elambert/honeycomb/labels{/name}", + "releases_url": "https://api.github.com/repos/elambert/honeycomb/releases{/id}", + "deployments_url": "https://api.github.com/repos/elambert/honeycomb/deployments", + "created_at": "2010-01-14T23:39:04Z", + "updated_at": "2016-11-20T21:43:25Z", + "pushed_at": "2012-08-29T20:09:44Z", + "git_url": "git://github.com/elambert/honeycomb.git", + "ssh_url": "git@github.com:elambert/honeycomb.git", + "clone_url": "https://github.com/elambert/honeycomb.git", + "svn_url": "https://github.com/elambert/honeycomb", + "homepage": "", + "size": 56499, + "stargazers_count": 6, + "watchers_count": 6, + "language": "Java", + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "open_issues_count": 0, + "forks": 2, + "open_issues": 0, + "watchers": 6, + "default_branch": "master", + "score": 28.65449 + }, + { + "id": 15931770, + "name": "honeycomb", + "full_name": "acumenbrands/honeycomb", + "owner": { + "login": "acumenbrands", + "id": 961664, + "avatar_url": "https://avatars.githubusercontent.com/u/961664?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/acumenbrands", + "html_url": "https://github.com/acumenbrands", + "followers_url": "https://api.github.com/users/acumenbrands/followers", + "following_url": "https://api.github.com/users/acumenbrands/following{/other_user}", + "gists_url": "https://api.github.com/users/acumenbrands/gists{/gist_id}", + "starred_url": "https://api.github.com/users/acumenbrands/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/acumenbrands/subscriptions", + "organizations_url": "https://api.github.com/users/acumenbrands/orgs", + "repos_url": "https://api.github.com/users/acumenbrands/repos", + "events_url": "https://api.github.com/users/acumenbrands/events{/privacy}", + "received_events_url": "https://api.github.com/users/acumenbrands/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/acumenbrands/honeycomb", + "description": "Honeycomb is an Object Oriented hover intent library", + "fork": false, + "url": "https://api.github.com/repos/acumenbrands/honeycomb", + "forks_url": "https://api.github.com/repos/acumenbrands/honeycomb/forks", + "keys_url": "https://api.github.com/repos/acumenbrands/honeycomb/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/acumenbrands/honeycomb/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/acumenbrands/honeycomb/teams", + "hooks_url": "https://api.github.com/repos/acumenbrands/honeycomb/hooks", + "issue_events_url": "https://api.github.com/repos/acumenbrands/honeycomb/issues/events{/number}", + "events_url": "https://api.github.com/repos/acumenbrands/honeycomb/events", + "assignees_url": "https://api.github.com/repos/acumenbrands/honeycomb/assignees{/user}", + "branches_url": "https://api.github.com/repos/acumenbrands/honeycomb/branches{/branch}", + "tags_url": "https://api.github.com/repos/acumenbrands/honeycomb/tags", + "blobs_url": "https://api.github.com/repos/acumenbrands/honeycomb/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/acumenbrands/honeycomb/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/acumenbrands/honeycomb/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/acumenbrands/honeycomb/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/acumenbrands/honeycomb/statuses/{sha}", + "languages_url": "https://api.github.com/repos/acumenbrands/honeycomb/languages", + "stargazers_url": "https://api.github.com/repos/acumenbrands/honeycomb/stargazers", + "contributors_url": "https://api.github.com/repos/acumenbrands/honeycomb/contributors", + "subscribers_url": "https://api.github.com/repos/acumenbrands/honeycomb/subscribers", + "subscription_url": "https://api.github.com/repos/acumenbrands/honeycomb/subscription", + "commits_url": "https://api.github.com/repos/acumenbrands/honeycomb/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/acumenbrands/honeycomb/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/acumenbrands/honeycomb/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/acumenbrands/honeycomb/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/acumenbrands/honeycomb/contents/{+path}", + "compare_url": "https://api.github.com/repos/acumenbrands/honeycomb/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/acumenbrands/honeycomb/merges", + "archive_url": "https://api.github.com/repos/acumenbrands/honeycomb/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/acumenbrands/honeycomb/downloads", + "issues_url": "https://api.github.com/repos/acumenbrands/honeycomb/issues{/number}", + "pulls_url": "https://api.github.com/repos/acumenbrands/honeycomb/pulls{/number}", + "milestones_url": "https://api.github.com/repos/acumenbrands/honeycomb/milestones{/number}", + "notifications_url": "https://api.github.com/repos/acumenbrands/honeycomb/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/acumenbrands/honeycomb/labels{/name}", + "releases_url": "https://api.github.com/repos/acumenbrands/honeycomb/releases{/id}", + "deployments_url": "https://api.github.com/repos/acumenbrands/honeycomb/deployments", + "created_at": "2014-01-15T10:17:47Z", + "updated_at": "2014-06-13T15:46:45Z", + "pushed_at": "2014-06-13T15:46:45Z", + "git_url": "git://github.com/acumenbrands/honeycomb.git", + "ssh_url": "git@github.com:acumenbrands/honeycomb.git", + "clone_url": "https://github.com/acumenbrands/honeycomb.git", + "svn_url": "https://github.com/acumenbrands/honeycomb", + "homepage": null, + "size": 692, + "stargazers_count": 1, + "watchers_count": 1, + "language": "JavaScript", + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 4, + "mirror_url": null, + "open_issues_count": 0, + "forks": 4, + "open_issues": 0, + "watchers": 1, + "default_branch": "master", + "score": 27.953007 + }, + { + "id": 3999344, + "name": "honeycomb", + "full_name": "chazmatazz/honeycomb", + "owner": { + "login": "chazmatazz", + "id": 49471, + "avatar_url": "https://avatars.githubusercontent.com/u/49471?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/chazmatazz", + "html_url": "https://github.com/chazmatazz", + "followers_url": "https://api.github.com/users/chazmatazz/followers", + "following_url": "https://api.github.com/users/chazmatazz/following{/other_user}", + "gists_url": "https://api.github.com/users/chazmatazz/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chazmatazz/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chazmatazz/subscriptions", + "organizations_url": "https://api.github.com/users/chazmatazz/orgs", + "repos_url": "https://api.github.com/users/chazmatazz/repos", + "events_url": "https://api.github.com/users/chazmatazz/events{/privacy}", + "received_events_url": "https://api.github.com/users/chazmatazz/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/chazmatazz/honeycomb", + "description": "Honeycomb art project", + "fork": false, + "url": "https://api.github.com/repos/chazmatazz/honeycomb", + "forks_url": "https://api.github.com/repos/chazmatazz/honeycomb/forks", + "keys_url": "https://api.github.com/repos/chazmatazz/honeycomb/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/chazmatazz/honeycomb/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/chazmatazz/honeycomb/teams", + "hooks_url": "https://api.github.com/repos/chazmatazz/honeycomb/hooks", + "issue_events_url": "https://api.github.com/repos/chazmatazz/honeycomb/issues/events{/number}", + "events_url": "https://api.github.com/repos/chazmatazz/honeycomb/events", + "assignees_url": "https://api.github.com/repos/chazmatazz/honeycomb/assignees{/user}", + "branches_url": "https://api.github.com/repos/chazmatazz/honeycomb/branches{/branch}", + "tags_url": "https://api.github.com/repos/chazmatazz/honeycomb/tags", + "blobs_url": "https://api.github.com/repos/chazmatazz/honeycomb/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/chazmatazz/honeycomb/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/chazmatazz/honeycomb/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/chazmatazz/honeycomb/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/chazmatazz/honeycomb/statuses/{sha}", + "languages_url": "https://api.github.com/repos/chazmatazz/honeycomb/languages", + "stargazers_url": "https://api.github.com/repos/chazmatazz/honeycomb/stargazers", + "contributors_url": "https://api.github.com/repos/chazmatazz/honeycomb/contributors", + "subscribers_url": "https://api.github.com/repos/chazmatazz/honeycomb/subscribers", + "subscription_url": "https://api.github.com/repos/chazmatazz/honeycomb/subscription", + "commits_url": "https://api.github.com/repos/chazmatazz/honeycomb/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/chazmatazz/honeycomb/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/chazmatazz/honeycomb/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/chazmatazz/honeycomb/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/chazmatazz/honeycomb/contents/{+path}", + "compare_url": "https://api.github.com/repos/chazmatazz/honeycomb/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/chazmatazz/honeycomb/merges", + "archive_url": "https://api.github.com/repos/chazmatazz/honeycomb/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/chazmatazz/honeycomb/downloads", + "issues_url": "https://api.github.com/repos/chazmatazz/honeycomb/issues{/number}", + "pulls_url": "https://api.github.com/repos/chazmatazz/honeycomb/pulls{/number}", + "milestones_url": "https://api.github.com/repos/chazmatazz/honeycomb/milestones{/number}", + "notifications_url": "https://api.github.com/repos/chazmatazz/honeycomb/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/chazmatazz/honeycomb/labels{/name}", + "releases_url": "https://api.github.com/repos/chazmatazz/honeycomb/releases{/id}", + "deployments_url": "https://api.github.com/repos/chazmatazz/honeycomb/deployments", + "created_at": "2012-04-11T23:07:42Z", + "updated_at": "2014-04-17T06:02:32Z", + "pushed_at": "2012-05-09T19:20:08Z", + "git_url": "git://github.com/chazmatazz/honeycomb.git", + "ssh_url": "git@github.com:chazmatazz/honeycomb.git", + "clone_url": "https://github.com/chazmatazz/honeycomb.git", + "svn_url": "https://github.com/chazmatazz/honeycomb", + "homepage": "", + "size": 111, + "stargazers_count": 4, + "watchers_count": 4, + "language": "C++", + "has_issues": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 2, + "mirror_url": null, + "open_issues_count": 0, + "forks": 2, + "open_issues": 0, + "watchers": 4, + "default_branch": "master", + "score": 27.528131 + }, + { + "id": 3209088, + "name": "Tiny-Tiny-RSS-for-Honeycomb", + "full_name": "dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb", + "owner": { + "login": "dontcallmedom", + "id": 216410, + "avatar_url": "https://avatars.githubusercontent.com/u/216410?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/dontcallmedom", + "html_url": "https://github.com/dontcallmedom", + "followers_url": "https://api.github.com/users/dontcallmedom/followers", + "following_url": "https://api.github.com/users/dontcallmedom/following{/other_user}", + "gists_url": "https://api.github.com/users/dontcallmedom/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dontcallmedom/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dontcallmedom/subscriptions", + "organizations_url": "https://api.github.com/users/dontcallmedom/orgs", + "repos_url": "https://api.github.com/users/dontcallmedom/repos", + "events_url": "https://api.github.com/users/dontcallmedom/events{/privacy}", + "received_events_url": "https://api.github.com/users/dontcallmedom/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb", + "description": "Tiny Tiny RSS client for Android devices", + "fork": false, + "url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb", + "forks_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/forks", + "keys_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/teams", + "hooks_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/hooks", + "issue_events_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/issues/events{/number}", + "events_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/events", + "assignees_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/assignees{/user}", + "branches_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/branches{/branch}", + "tags_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/tags", + "blobs_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/statuses/{sha}", + "languages_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/languages", + "stargazers_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/stargazers", + "contributors_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/contributors", + "subscribers_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/subscribers", + "subscription_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/subscription", + "commits_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/contents/{+path}", + "compare_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/merges", + "archive_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/downloads", + "issues_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/issues{/number}", + "pulls_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/pulls{/number}", + "milestones_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/milestones{/number}", + "notifications_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/labels{/name}", + "releases_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/releases{/id}", + "deployments_url": "https://api.github.com/repos/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb/deployments", + "created_at": "2012-01-18T14:14:35Z", + "updated_at": "2016-02-03T22:27:18Z", + "pushed_at": "2012-01-31T15:42:05Z", + "git_url": "git://github.com/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb.git", + "ssh_url": "git@github.com:dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb.git", + "clone_url": "https://github.com/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb.git", + "svn_url": "https://github.com/dontcallmedom/Tiny-Tiny-RSS-for-Honeycomb", + "homepage": "http://tt-rss.org/tt-rss-android", + "size": 1590, + "stargazers_count": 1, + "watchers_count": 1, + "language": "Java", + "has_issues": false, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 134, + "mirror_url": null, + "open_issues_count": 0, + "forks": 134, + "open_issues": 0, + "watchers": 1, + "default_branch": "master", + "score": 22.274088 + } + ] +} diff --git a/__tests__/github.js b/__tests__/github.js index 16be13f..76898df 100644 --- a/__tests__/github.js +++ b/__tests__/github.js @@ -1,8 +1,105 @@ -const github = require('../src/github'); - describe('github.js', () => { + beforeEach(() => { + jest.resetAllMocks(); + jest.resetModules(); + }); + describe('search', () => { - const searchResult = github.search('yarn'); + let got; + let github; + + beforeEach(() => { + jest.mock('got'); + got = require('got'); // eslint-disable-line global-require + github = require('../src/github'); // eslint-disable-line global-require + console.error = jest.fn(); // eslint-disable-line no-console + + got.mockImplementation(() => new Promise(resolve => resolve({ + // eslint-disable-next-line global-require + body: require('../__mocks__/result.json'), + }))); + }); + + test('call got with url and options', () => ( + github.search('honeycomb') + .then(() => { + expect(got).toHaveBeenCalledWith( + 'https://api.github.com/search/repositories', + { + query: { + q: 'honeycomb', + per_page: 10, + }, + json: true, + headers: { + accept: 'application/vnd.github.v3+json', + }, + }, + ); + }) + )); + + test('returns an array', () => ( + github.search('honeycomb') + .then((packages) => { + expect(packages).toBeInstanceOf(Array); + }) + )); + + test('returns the expected title', () => ( + github.search('honeycomb') + .then((packages) => { + expect(packages[0].title).toBe('altamiracorp/honeycomb'); + }) + )); + + test('returns the expected value', () => ( + github.search('honeycomb') + .then((packages) => { + expect(packages[0].value).toBe( + 'https://github.com/altamiracorp/honeycomb', + ); + }) + )); + + test('returns the expected subtitle', () => ( + github.search('honeycomb') + .then((packages) => { + expect(packages[0].subtitle).toBe('MySql storage engine for the cloud'); + }) + )); + + test('call console.error with an error message', () => { + const body = ` + { + "message": "Validation Failed", + "errors": [ + { + "resource": "Search", + "field": "q", + "code": "missing" + } + ], + "documentation_url": "https://developer.github.com/v3/search" + } + `; + + got.mockImplementation(() => new Promise((resolve, reject) => reject({ + response: { body }, + }))); + + return github.search('honeycomb') + .catch(() => { + // eslint-disable-next-line no-console + expect(console.error).toHaveBeenCalledWith(body); + }); + }); + }); + + describe('integration', () => { + // eslint-disable-next-line global-require + const github = require('../src/github'); + const searchResult = github.search('honeycomb'); test('returns an array', () => ( searchResult.then((packages) => { diff --git a/__tests__/index.test.js b/__tests__/index.test.js index 7d5c315..ad28db9 100644 --- a/__tests__/index.test.js +++ b/__tests__/index.test.js @@ -4,14 +4,14 @@ const github = require('../src/github'); describe('index.js', () => { beforeEach(() => { github.search = jest.fn(); - index()('zazu'); + index()('honeycomb'); }); afterEach(() => { jest.resetAllMocks(); }); - test('called github.search with zazu', () => { - expect(github.search).toBeCalledWith('zazu'); + test('call github.search with "honeycomb"', () => { + expect(github.search).toBeCalledWith('honeycomb'); }); }); diff --git a/__tests__/zazu.test.js b/__tests__/zazu.test.js index 1fe9965..69e78fc 100644 --- a/__tests__/zazu.test.js +++ b/__tests__/zazu.test.js @@ -1,7 +1,7 @@ +const config = require('../zazu.json'); + describe('zazu.json', () => { test('is valid', () => { - // eslint-disable-next-line global-require, import/no-unresolved - const config = require('../zazu.json'); expect(config).toBeInstanceOf(Object); }); });