{"action":"created","comment":{"url":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/comments/38477244","id":38477244,"diff_hunk":"@@ -36,45 +35,67 @@ const dependencies = {\n     name: 'incorrectly-tagged',\n     realPath: 'incorrectly-tagged realpath',\n     keywords: ['cloverfield', 'something else']\n+  },\n+  packageWithoutName: {\n+    // should skip this because it does not have a name\n+    realPath: 'package-without-name realpath',\n+    keywords: ['cloverfield', 'scaffold']\n   }\n };\n \n \n-const before = () => {\n-  // Stubs\n-  const load = spy();\n-\n-  stub(npm, 'load', load);\n-  npm.commands = {\n-    ls: spy()\n+const mockNpm = () => {\n+  const npm = {\n+    load: spy(),\n+    commands: {\n+      ls: spy()\n+    }\n   };\n \n-  return {load};\n+  return {npm};\n };\n \n \n-const after = () => {\n-  npm.load.restore();\n-};\n+test('Find Scaffolds API', assert => {\n+  const {npm} = mockNpm();\n+\n+  assert.ok(findGlobal(npm) instanceof Function, 'should be function');\n+  assert.ok(findGlobal(npm)() instanceof Promise, 'should return Promise');","path":"test/lib/find-scaffolds.js","position":52,"original_position":52,"commit_id":"e2d6827faa588625dbf74c0d0e36b13e0b75ac76","original_commit_id":"e2d6827faa588625dbf74c0d0e36b13e0b75ac76","user":{"login":"nkbt","id":175264,"avatar_url":"https://avatars.githubusercontent.com/u/175264?v=3","gravatar_id":"","url":"https://api.github.com/users/nkbt","html_url":"https://github.com/nkbt","followers_url":"https://api.github.com/users/nkbt/followers","following_url":"https://api.github.com/users/nkbt/following{/other_user}","gists_url":"https://api.github.com/users/nkbt/gists{/gist_id}","starred_url":"https://api.github.com/users/nkbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkbt/subscriptions","organizations_url":"https://api.github.com/users/nkbt/orgs","repos_url":"https://api.github.com/users/nkbt/repos","events_url":"https://api.github.com/users/nkbt/events{/privacy}","received_events_url":"https://api.github.com/users/nkbt/received_events","type":"User","site_admin":false},"body":"This one simply checks if API returns expected values. So if one more currying is added, for example, test will fail. I'm not quite sure what you mean here.","created_at":"2015-09-01T21:55:10Z","updated_at":"2015-09-01T21:55:10Z","html_url":"https://github.com/cloverfield-tools/cloverfield/pull/34#discussion_r38477244","pull_request_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/comments/38477244"},"html":{"href":"https://github.com/cloverfield-tools/cloverfield/pull/34#discussion_r38477244"},"pull_request":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/34","id":43285243,"html_url":"https://github.com/cloverfield-tools/cloverfield/pull/34","diff_url":"https://github.com/cloverfield-tools/cloverfield/pull/34.diff","patch_url":"https://github.com/cloverfield-tools/cloverfield/pull/34.patch","issue_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/issues/34","number":34,"state":"open","locked":false,"title":"[#33] Search for packages locally ","user":{"login":"nkbt","id":175264,"avatar_url":"https://avatars.githubusercontent.com/u/175264?v=3","gravatar_id":"","url":"https://api.github.com/users/nkbt","html_url":"https://github.com/nkbt","followers_url":"https://api.github.com/users/nkbt/followers","following_url":"https://api.github.com/users/nkbt/following{/other_user}","gists_url":"https://api.github.com/users/nkbt/gists{/gist_id}","starred_url":"https://api.github.com/users/nkbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkbt/subscriptions","organizations_url":"https://api.github.com/users/nkbt/orgs","repos_url":"https://api.github.com/users/nkbt/repos","events_url":"https://api.github.com/users/nkbt/events{/privacy}","received_events_url":"https://api.github.com/users/nkbt/received_events","type":"User","site_admin":false},"body":"1. Added ability to search for global and local packages\r\n1. Updated tests\r\n1. Fixed issue with incorrect packages (without name), thanks to additional test\r\n1. Updated cli to merge local and global packages\r\n1. Fixed build command to require correct package CLI\r\n\r\n\r\nTested by installing fixed (corrected `main`) cf-package from fs: `npm install ~/nkbt/cf-package`. All picked up:\r\n\r\n<img width=\"643\" alt=\"20150825-232649\" src=\"https://cloud.githubusercontent.com/assets/175264/9467690/d39ea53a-4b80-11e5-9995-cc27d817b80d.png\">\r\n\r\n","created_at":"2015-08-25T13:27:34Z","updated_at":"2015-09-01T21:55:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d65d0e03f2f6e1416652cf77ba74358b5c5b8860","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/34/commits","review_comments_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/34/comments","review_comment_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/issues/34/comments","statuses_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/statuses/e2d6827faa588625dbf74c0d0e36b13e0b75ac76","head":{"label":"nkbt:find-local","ref":"find-local","sha":"e2d6827faa588625dbf74c0d0e36b13e0b75ac76","user":{"login":"nkbt","id":175264,"avatar_url":"https://avatars.githubusercontent.com/u/175264?v=3","gravatar_id":"","url":"https://api.github.com/users/nkbt","html_url":"https://github.com/nkbt","followers_url":"https://api.github.com/users/nkbt/followers","following_url":"https://api.github.com/users/nkbt/following{/other_user}","gists_url":"https://api.github.com/users/nkbt/gists{/gist_id}","starred_url":"https://api.github.com/users/nkbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkbt/subscriptions","organizations_url":"https://api.github.com/users/nkbt/orgs","repos_url":"https://api.github.com/users/nkbt/repos","events_url":"https://api.github.com/users/nkbt/events{/privacy}","received_events_url":"https://api.github.com/users/nkbt/received_events","type":"User","site_admin":false},"repo":{"id":38527470,"name":"cloverfield","full_name":"nkbt/cloverfield","owner":{"login":"nkbt","id":175264,"avatar_url":"https://avatars.githubusercontent.com/u/175264?v=3","gravatar_id":"","url":"https://api.github.com/users/nkbt","html_url":"https://github.com/nkbt","followers_url":"https://api.github.com/users/nkbt/followers","following_url":"https://api.github.com/users/nkbt/following{/other_user}","gists_url":"https://api.github.com/users/nkbt/gists{/gist_id}","starred_url":"https://api.github.com/users/nkbt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkbt/subscriptions","organizations_url":"https://api.github.com/users/nkbt/orgs","repos_url":"https://api.github.com/users/nkbt/repos","events_url":"https://api.github.com/users/nkbt/events{/privacy}","received_events_url":"https://api.github.com/users/nkbt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nkbt/cloverfield","description":"A next generation JavaScript boilerplate scaffolding tool.","fork":true,"url":"https://api.github.com/repos/nkbt/cloverfield","forks_url":"https://api.github.com/repos/nkbt/cloverfield/forks","keys_url":"https://api.github.com/repos/nkbt/cloverfield/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nkbt/cloverfield/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nkbt/cloverfield/teams","hooks_url":"https://api.github.com/repos/nkbt/cloverfield/hooks","issue_events_url":"https://api.github.com/repos/nkbt/cloverfield/issues/events{/number}","events_url":"https://api.github.com/repos/nkbt/cloverfield/events","assignees_url":"https://api.github.com/repos/nkbt/cloverfield/assignees{/user}","branches_url":"https://api.github.com/repos/nkbt/cloverfield/branches{/branch}","tags_url":"https://api.github.com/repos/nkbt/cloverfield/tags","blobs_url":"https://api.github.com/repos/nkbt/cloverfield/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nkbt/cloverfield/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nkbt/cloverfield/git/refs{/sha}","trees_url":"https://api.github.com/repos/nkbt/cloverfield/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nkbt/cloverfield/statuses/{sha}","languages_url":"https://api.github.com/repos/nkbt/cloverfield/languages","stargazers_url":"https://api.github.com/repos/nkbt/cloverfield/stargazers","contributors_url":"https://api.github.com/repos/nkbt/cloverfield/contributors","subscribers_url":"https://api.github.com/repos/nkbt/cloverfield/subscribers","subscription_url":"https://api.github.com/repos/nkbt/cloverfield/subscription","commits_url":"https://api.github.com/repos/nkbt/cloverfield/commits{/sha}","git_commits_url":"https://api.github.com/repos/nkbt/cloverfield/git/commits{/sha}","comments_url":"https://api.github.com/repos/nkbt/cloverfield/comments{/number}","issue_comment_url":"https://api.github.com/repos/nkbt/cloverfield/issues/comments{/number}","contents_url":"https://api.github.com/repos/nkbt/cloverfield/contents/{+path}","compare_url":"https://api.github.com/repos/nkbt/cloverfield/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nkbt/cloverfield/merges","archive_url":"https://api.github.com/repos/nkbt/cloverfield/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nkbt/cloverfield/downloads","issues_url":"https://api.github.com/repos/nkbt/cloverfield/issues{/number}","pulls_url":"https://api.github.com/repos/nkbt/cloverfield/pulls{/number}","milestones_url":"https://api.github.com/repos/nkbt/cloverfield/milestones{/number}","notifications_url":"https://api.github.com/repos/nkbt/cloverfield/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nkbt/cloverfield/labels{/name}","releases_url":"https://api.github.com/repos/nkbt/cloverfield/releases{/id}","created_at":"2015-07-04T08:31:42Z","updated_at":"2015-07-03T12:50:17Z","pushed_at":"2015-08-29T08:09:01Z","git_url":"git://github.com/nkbt/cloverfield.git","ssh_url":"git@github.com:nkbt/cloverfield.git","clone_url":"https://github.com/nkbt/cloverfield.git","svn_url":"https://github.com/nkbt/cloverfield","homepage":"","size":154,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cloverfield-tools:master","ref":"master","sha":"781c0f3f2154a926fe09e64cb80ee721412db9b1","user":{"login":"cloverfield-tools","id":13182545,"avatar_url":"https://avatars.githubusercontent.com/u/13182545?v=3","gravatar_id":"","url":"https://api.github.com/users/cloverfield-tools","html_url":"https://github.com/cloverfield-tools","followers_url":"https://api.github.com/users/cloverfield-tools/followers","following_url":"https://api.github.com/users/cloverfield-tools/following{/other_user}","gists_url":"https://api.github.com/users/cloverfield-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/cloverfield-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloverfield-tools/subscriptions","organizations_url":"https://api.github.com/users/cloverfield-tools/orgs","repos_url":"https://api.github.com/users/cloverfield-tools/repos","events_url":"https://api.github.com/users/cloverfield-tools/events{/privacy}","received_events_url":"https://api.github.com/users/cloverfield-tools/received_events","type":"Organization","site_admin":false},"repo":{"id":28787692,"name":"cloverfield","full_name":"cloverfield-tools/cloverfield","owner":{"login":"cloverfield-tools","id":13182545,"avatar_url":"https://avatars.githubusercontent.com/u/13182545?v=3","gravatar_id":"","url":"https://api.github.com/users/cloverfield-tools","html_url":"https://github.com/cloverfield-tools","followers_url":"https://api.github.com/users/cloverfield-tools/followers","following_url":"https://api.github.com/users/cloverfield-tools/following{/other_user}","gists_url":"https://api.github.com/users/cloverfield-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/cloverfield-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloverfield-tools/subscriptions","organizations_url":"https://api.github.com/users/cloverfield-tools/orgs","repos_url":"https://api.github.com/users/cloverfield-tools/repos","events_url":"https://api.github.com/users/cloverfield-tools/events{/privacy}","received_events_url":"https://api.github.com/users/cloverfield-tools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloverfield-tools/cloverfield","description":"A next generation JavaScript boilerplate scaffolding tool.","fork":false,"url":"https://api.github.com/repos/cloverfield-tools/cloverfield","forks_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/forks","keys_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/teams","hooks_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/hooks","issue_events_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/issues/events{/number}","events_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/events","assignees_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/assignees{/user}","branches_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/branches{/branch}","tags_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/tags","blobs_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/statuses/{sha}","languages_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/languages","stargazers_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/stargazers","contributors_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/contributors","subscribers_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/subscribers","subscription_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/subscription","commits_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/contents/{+path}","compare_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/merges","archive_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/downloads","issues_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/issues{/number}","pulls_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls{/number}","milestones_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/milestones{/number}","notifications_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/labels{/name}","releases_url":"https://api.github.com/repos/cloverfield-tools/cloverfield/releases{/id}","created_at":"2015-01-04T22:14:01Z","updated_at":"2015-08-29T22:09:12Z","pushed_at":"2015-08-29T08:09:01Z","git_url":"git://github.com/cloverfield-tools/cloverfield.git","ssh_url":"git@github.com:cloverfield-tools/cloverfield.git","clone_url":"https://github.com/cloverfield-tools/cloverfield.git","svn_url":"https://github.com/cloverfield-tools/cloverfield","homepage":"","size":391,"stargazers_count":108,"watchers_count":108,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":8,"forks":6,"open_issues":8,"watchers":108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/34"},"html":{"href":"https://github.com/cloverfield-tools/cloverfield/pull/34"},"issue":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/issues/34"},"comments":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/cloverfield-tools/cloverfield/statuses/e2d6827faa588625dbf74c0d0e36b13e0b75ac76"}}}}