{"action":"created","comment":{"url":"https://api.github.com/repos/elsapeng/swagger-node/pulls/comments/34198646","id":34198646,"diff_hunk":"@@ -383,6 +384,45 @@ function testGenerate(directory, options, cb) {\n   var testModule = options.testModule || TESTMODULES[0];\n   var assertionFormat = options.assertionFormat || ASSERTIONTYPES[0];\n \n+  findProjectFile(directory, null, function(err, projPath) {\n+    var projectFile = fs.readFileSync(projPath, 'utf8');\n+    var projectJson = JSON.parse(projectFile);\n+    var runInstall = false;\n+\n+    if (!projectJson.devDependencies.hasOwnProperty('z-schema')) {\n+      projectJson.devDependencies['z-schema'] = '^3.12.0';\n+      runInstall = true;\n+    }\n+\n+    if (!projectJson.devDependencies.hasOwnProperty('chai')) {\n+      projectJson.devDependencies.chai = '^3.0.0';\n+      runInstall = true;\n+    }\n+\n+    if (!projectJson.devDependencies.hasOwnProperty('mocha')) {\n+      projectJson.devDependencies.mocha = '^2.2.5';\n+      runInstall = true;\n+    }\n+\n+    if (!projectJson.hasOwnProperty('scripts') || !projectJson.scripts.hasOwnProperty('test')) {\n+      projectJson.scripts = {test: './node_modules/mocha/bin/mocha test'};","path":"lib/commands/project/project.js","position":42,"original_position":42,"commit_id":"57ae41139c97814286bf559151c1b90d2b2bc247","original_commit_id":"57ae41139c97814286bf559151c1b90d2b2bc247","user":{"login":"noahdietz","id":6644735,"avatar_url":"https://avatars.githubusercontent.com/u/6644735?v=3","gravatar_id":"","url":"https://api.github.com/users/noahdietz","html_url":"https://github.com/noahdietz","followers_url":"https://api.github.com/users/noahdietz/followers","following_url":"https://api.github.com/users/noahdietz/following{/other_user}","gists_url":"https://api.github.com/users/noahdietz/gists{/gist_id}","starred_url":"https://api.github.com/users/noahdietz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahdietz/subscriptions","organizations_url":"https://api.github.com/users/noahdietz/orgs","repos_url":"https://api.github.com/users/noahdietz/repos","events_url":"https://api.github.com/users/noahdietz/events{/privacy}","received_events_url":"https://api.github.com/users/noahdietz/received_events","type":"User","site_admin":false},"body":"thanks for catching that @theganyo, i should be extending it instead","created_at":"2015-07-08T21:07:29Z","updated_at":"2015-07-08T21:07:29Z","html_url":"https://github.com/elsapeng/swagger-node/pull/8#discussion_r34198646","pull_request_url":"https://api.github.com/repos/elsapeng/swagger-node/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/elsapeng/swagger-node/pulls/comments/34198646"},"html":{"href":"https://github.com/elsapeng/swagger-node/pull/8#discussion_r34198646"},"pull_request":{"href":"https://api.github.com/repos/elsapeng/swagger-node/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/elsapeng/swagger-node/pulls/8","id":39429261,"html_url":"https://github.com/elsapeng/swagger-node/pull/8","diff_url":"https://github.com/elsapeng/swagger-node/pull/8.diff","patch_url":"https://github.com/elsapeng/swagger-node/pull/8.patch","issue_url":"https://api.github.com/repos/elsapeng/swagger-node/issues/8","number":8,"state":"open","locked":false,"title":"add z-schema dependency injection to testGenerate","user":{"login":"noahdietz","id":6644735,"avatar_url":"https://avatars.githubusercontent.com/u/6644735?v=3","gravatar_id":"","url":"https://api.github.com/users/noahdietz","html_url":"https://github.com/noahdietz","followers_url":"https://api.github.com/users/noahdietz/followers","following_url":"https://api.github.com/users/noahdietz/following{/other_user}","gists_url":"https://api.github.com/users/noahdietz/gists{/gist_id}","starred_url":"https://api.github.com/users/noahdietz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahdietz/subscriptions","organizations_url":"https://api.github.com/users/noahdietz/orgs","repos_url":"https://api.github.com/users/noahdietz/repos","events_url":"https://api.github.com/users/noahdietz/events{/privacy}","received_events_url":"https://api.github.com/users/noahdietz/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-07T23:52:03Z","updated_at":"2015-07-08T21:07:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4e0128d7750955a18809c0d65ea8df981baf498","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elsapeng/swagger-node/pulls/8/commits","review_comments_url":"https://api.github.com/repos/elsapeng/swagger-node/pulls/8/comments","review_comment_url":"https://api.github.com/repos/elsapeng/swagger-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elsapeng/swagger-node/issues/8/comments","statuses_url":"https://api.github.com/repos/elsapeng/swagger-node/statuses/57ae41139c97814286bf559151c1b90d2b2bc247","head":{"label":"noahdietz:test-generation","ref":"test-generation","sha":"57ae41139c97814286bf559151c1b90d2b2bc247","user":{"login":"noahdietz","id":6644735,"avatar_url":"https://avatars.githubusercontent.com/u/6644735?v=3","gravatar_id":"","url":"https://api.github.com/users/noahdietz","html_url":"https://github.com/noahdietz","followers_url":"https://api.github.com/users/noahdietz/followers","following_url":"https://api.github.com/users/noahdietz/following{/other_user}","gists_url":"https://api.github.com/users/noahdietz/gists{/gist_id}","starred_url":"https://api.github.com/users/noahdietz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahdietz/subscriptions","organizations_url":"https://api.github.com/users/noahdietz/orgs","repos_url":"https://api.github.com/users/noahdietz/repos","events_url":"https://api.github.com/users/noahdietz/events{/privacy}","received_events_url":"https://api.github.com/users/noahdietz/received_events","type":"User","site_admin":false},"repo":{"id":38716598,"name":"swagger-node","full_name":"noahdietz/swagger-node","owner":{"login":"noahdietz","id":6644735,"avatar_url":"https://avatars.githubusercontent.com/u/6644735?v=3","gravatar_id":"","url":"https://api.github.com/users/noahdietz","html_url":"https://github.com/noahdietz","followers_url":"https://api.github.com/users/noahdietz/followers","following_url":"https://api.github.com/users/noahdietz/following{/other_user}","gists_url":"https://api.github.com/users/noahdietz/gists{/gist_id}","starred_url":"https://api.github.com/users/noahdietz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahdietz/subscriptions","organizations_url":"https://api.github.com/users/noahdietz/orgs","repos_url":"https://api.github.com/users/noahdietz/repos","events_url":"https://api.github.com/users/noahdietz/events{/privacy}","received_events_url":"https://api.github.com/users/noahdietz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noahdietz/swagger-node","description":"Swagger module for node.js","fork":true,"url":"https://api.github.com/repos/noahdietz/swagger-node","forks_url":"https://api.github.com/repos/noahdietz/swagger-node/forks","keys_url":"https://api.github.com/repos/noahdietz/swagger-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noahdietz/swagger-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noahdietz/swagger-node/teams","hooks_url":"https://api.github.com/repos/noahdietz/swagger-node/hooks","issue_events_url":"https://api.github.com/repos/noahdietz/swagger-node/issues/events{/number}","events_url":"https://api.github.com/repos/noahdietz/swagger-node/events","assignees_url":"https://api.github.com/repos/noahdietz/swagger-node/assignees{/user}","branches_url":"https://api.github.com/repos/noahdietz/swagger-node/branches{/branch}","tags_url":"https://api.github.com/repos/noahdietz/swagger-node/tags","blobs_url":"https://api.github.com/repos/noahdietz/swagger-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noahdietz/swagger-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noahdietz/swagger-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/noahdietz/swagger-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noahdietz/swagger-node/statuses/{sha}","languages_url":"https://api.github.com/repos/noahdietz/swagger-node/languages","stargazers_url":"https://api.github.com/repos/noahdietz/swagger-node/stargazers","contributors_url":"https://api.github.com/repos/noahdietz/swagger-node/contributors","subscribers_url":"https://api.github.com/repos/noahdietz/swagger-node/subscribers","subscription_url":"https://api.github.com/repos/noahdietz/swagger-node/subscription","commits_url":"https://api.github.com/repos/noahdietz/swagger-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/noahdietz/swagger-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/noahdietz/swagger-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/noahdietz/swagger-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/noahdietz/swagger-node/contents/{+path}","compare_url":"https://api.github.com/repos/noahdietz/swagger-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noahdietz/swagger-node/merges","archive_url":"https://api.github.com/repos/noahdietz/swagger-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noahdietz/swagger-node/downloads","issues_url":"https://api.github.com/repos/noahdietz/swagger-node/issues{/number}","pulls_url":"https://api.github.com/repos/noahdietz/swagger-node/pulls{/number}","milestones_url":"https://api.github.com/repos/noahdietz/swagger-node/milestones{/number}","notifications_url":"https://api.github.com/repos/noahdietz/swagger-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noahdietz/swagger-node/labels{/name}","releases_url":"https://api.github.com/repos/noahdietz/swagger-node/releases{/id}","created_at":"2015-07-07T21:45:59Z","updated_at":"2015-07-07T21:45:59Z","pushed_at":"2015-07-08T20:24:46Z","git_url":"git://github.com/noahdietz/swagger-node.git","ssh_url":"git@github.com:noahdietz/swagger-node.git","clone_url":"https://github.com/noahdietz/swagger-node.git","svn_url":"https://github.com/noahdietz/swagger-node","homepage":"http://swagger.io","size":2397,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"elsapeng:test-generation","ref":"test-generation","sha":"544a13279b25eb0f6e5c86e6d061260aa98548b8","user":{"login":"elsapeng","id":8696128,"avatar_url":"https://avatars.githubusercontent.com/u/8696128?v=3","gravatar_id":"","url":"https://api.github.com/users/elsapeng","html_url":"https://github.com/elsapeng","followers_url":"https://api.github.com/users/elsapeng/followers","following_url":"https://api.github.com/users/elsapeng/following{/other_user}","gists_url":"https://api.github.com/users/elsapeng/gists{/gist_id}","starred_url":"https://api.github.com/users/elsapeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsapeng/subscriptions","organizations_url":"https://api.github.com/users/elsapeng/orgs","repos_url":"https://api.github.com/users/elsapeng/repos","events_url":"https://api.github.com/users/elsapeng/events{/privacy}","received_events_url":"https://api.github.com/users/elsapeng/received_events","type":"User","site_admin":false},"repo":{"id":37949580,"name":"swagger-node","full_name":"elsapeng/swagger-node","owner":{"login":"elsapeng","id":8696128,"avatar_url":"https://avatars.githubusercontent.com/u/8696128?v=3","gravatar_id":"","url":"https://api.github.com/users/elsapeng","html_url":"https://github.com/elsapeng","followers_url":"https://api.github.com/users/elsapeng/followers","following_url":"https://api.github.com/users/elsapeng/following{/other_user}","gists_url":"https://api.github.com/users/elsapeng/gists{/gist_id}","starred_url":"https://api.github.com/users/elsapeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsapeng/subscriptions","organizations_url":"https://api.github.com/users/elsapeng/orgs","repos_url":"https://api.github.com/users/elsapeng/repos","events_url":"https://api.github.com/users/elsapeng/events{/privacy}","received_events_url":"https://api.github.com/users/elsapeng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elsapeng/swagger-node","description":"Swagger module for node.js","fork":true,"url":"https://api.github.com/repos/elsapeng/swagger-node","forks_url":"https://api.github.com/repos/elsapeng/swagger-node/forks","keys_url":"https://api.github.com/repos/elsapeng/swagger-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elsapeng/swagger-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elsapeng/swagger-node/teams","hooks_url":"https://api.github.com/repos/elsapeng/swagger-node/hooks","issue_events_url":"https://api.github.com/repos/elsapeng/swagger-node/issues/events{/number}","events_url":"https://api.github.com/repos/elsapeng/swagger-node/events","assignees_url":"https://api.github.com/repos/elsapeng/swagger-node/assignees{/user}","branches_url":"https://api.github.com/repos/elsapeng/swagger-node/branches{/branch}","tags_url":"https://api.github.com/repos/elsapeng/swagger-node/tags","blobs_url":"https://api.github.com/repos/elsapeng/swagger-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elsapeng/swagger-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elsapeng/swagger-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/elsapeng/swagger-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elsapeng/swagger-node/statuses/{sha}","languages_url":"https://api.github.com/repos/elsapeng/swagger-node/languages","stargazers_url":"https://api.github.com/repos/elsapeng/swagger-node/stargazers","contributors_url":"https://api.github.com/repos/elsapeng/swagger-node/contributors","subscribers_url":"https://api.github.com/repos/elsapeng/swagger-node/subscribers","subscription_url":"https://api.github.com/repos/elsapeng/swagger-node/subscription","commits_url":"https://api.github.com/repos/elsapeng/swagger-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/elsapeng/swagger-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/elsapeng/swagger-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/elsapeng/swagger-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/elsapeng/swagger-node/contents/{+path}","compare_url":"https://api.github.com/repos/elsapeng/swagger-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elsapeng/swagger-node/merges","archive_url":"https://api.github.com/repos/elsapeng/swagger-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elsapeng/swagger-node/downloads","issues_url":"https://api.github.com/repos/elsapeng/swagger-node/issues{/number}","pulls_url":"https://api.github.com/repos/elsapeng/swagger-node/pulls{/number}","milestones_url":"https://api.github.com/repos/elsapeng/swagger-node/milestones{/number}","notifications_url":"https://api.github.com/repos/elsapeng/swagger-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elsapeng/swagger-node/labels{/name}","releases_url":"https://api.github.com/repos/elsapeng/swagger-node/releases{/id}","created_at":"2015-06-23T22:56:27Z","updated_at":"2015-06-23T22:56:27Z","pushed_at":"2015-07-08T20:24:48Z","git_url":"git://github.com/elsapeng/swagger-node.git","ssh_url":"git@github.com:elsapeng/swagger-node.git","clone_url":"https://github.com/elsapeng/swagger-node.git","svn_url":"https://github.com/elsapeng/swagger-node","homepage":"http://swagger.io","size":2397,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elsapeng/swagger-node/pulls/8"},"html":{"href":"https://github.com/elsapeng/swagger-node/pull/8"},"issue":{"href":"https://api.github.com/repos/elsapeng/swagger-node/issues/8"},"comments":{"href":"https://api.github.com/repos/elsapeng/swagger-node/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/elsapeng/swagger-node/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/elsapeng/swagger-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elsapeng/swagger-node/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/elsapeng/swagger-node/statuses/57ae41139c97814286bf559151c1b90d2b2bc247"}}}}