{"action":"created","comment":{"url":"https://api.github.com/repos/mochajs/mocha/pulls/comments/237180599","pull_request_review_id":179417064,"id":237180599,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzE4MDU5OQ==","diff_hunk":"@@ -69,9 +70,26 @@ function getOptions() {\n     return;\n   }\n \n+  try {\n+    const testDir = JSON.parse(\n+      fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf8')\n+    ).directories['test'];\n+","path":"bin/options.js","position":null,"original_position":16,"commit_id":"0ed3a1137e124bafb191010265c1fdd142f7272b","original_commit_id":"c3b1935c19c154cd10696189e83f07909ba3671f","user":{"login":"juergba","id":44573692,"node_id":"MDQ6VXNlcjQ0NTczNjky","avatar_url":"https://avatars1.githubusercontent.com/u/44573692?v=4","gravatar_id":"","url":"https://api.github.com/users/juergba","html_url":"https://github.com/juergba","followers_url":"https://api.github.com/users/juergba/followers","following_url":"https://api.github.com/users/juergba/following{/other_user}","gists_url":"https://api.github.com/users/juergba/gists{/gist_id}","starred_url":"https://api.github.com/users/juergba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juergba/subscriptions","organizations_url":"https://api.github.com/users/juergba/orgs","repos_url":"https://api.github.com/users/juergba/repos","events_url":"https://api.github.com/users/juergba/events{/privacy}","received_events_url":"https://api.github.com/users/juergba/received_events","type":"User","site_admin":false},"body":"ok, done. ","created_at":"2018-11-28T17:15:56Z","updated_at":"2018-11-28T17:15:57Z","html_url":"https://github.com/mochajs/mocha/pull/3582#discussion_r237180599","pull_request_url":"https://api.github.com/repos/mochajs/mocha/pulls/3582","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/comments/237180599"},"html":{"href":"https://github.com/mochajs/mocha/pull/3582#discussion_r237180599"},"pull_request":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/3582"}},"in_reply_to_id":236848190},"pull_request":{"url":"https://api.github.com/repos/mochajs/mocha/pulls/3582","id":233915698,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzOTE1Njk4","html_url":"https://github.com/mochajs/mocha/pull/3582","diff_url":"https://github.com/mochajs/mocha/pull/3582.diff","patch_url":"https://github.com/mochajs/mocha/pull/3582.patch","issue_url":"https://api.github.com/repos/mochajs/mocha/issues/3582","number":3582,"state":"open","locked":false,"title":"Use \"package.json\" to determine test directory","user":{"login":"juergba","id":44573692,"node_id":"MDQ6VXNlcjQ0NTczNjky","avatar_url":"https://avatars1.githubusercontent.com/u/44573692?v=4","gravatar_id":"","url":"https://api.github.com/users/juergba","html_url":"https://github.com/juergba","followers_url":"https://api.github.com/users/juergba/followers","following_url":"https://api.github.com/users/juergba/following{/other_user}","gists_url":"https://api.github.com/users/juergba/gists{/gist_id}","starred_url":"https://api.github.com/users/juergba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juergba/subscriptions","organizations_url":"https://api.github.com/users/juergba/orgs","repos_url":"https://api.github.com/users/juergba/repos","events_url":"https://api.github.com/users/juergba/events{/privacy}","received_events_url":"https://api.github.com/users/juergba/received_events","type":"User","site_admin":false},"body":"### Description\r\n\r\nBy default the test folder is set to `test`.\r\nUse the field `directories.test` of package.json to set this folder differently.\r\n\r\n### Description of the Change\r\n\r\n#### options.js\r\n- get `directories.test` of package.json\r\n- if it exists use it for reading `mocha.opts`. The `--opt` flag has higher priority.\r\n#### _mocha.js\r\n- if it exists use it for reading the test files\r\n#### documentation\r\n- update section of test directory\r\n\r\n### Why should this be in core?\r\n\r\nnice-to-have\r\n\r\n### Applicable issues\r\n\r\nissue [#3562](https://github.com/mochajs/mocha/issues/3562)","created_at":"2018-11-27T13:43:53Z","updated_at":"2018-11-28T17:15:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79aff5a1120248a2f23518356b7d9930b89a9345","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mochajs/mocha/pulls/3582/commits","review_comments_url":"https://api.github.com/repos/mochajs/mocha/pulls/3582/comments","review_comment_url":"https://api.github.com/repos/mochajs/mocha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mochajs/mocha/issues/3582/comments","statuses_url":"https://api.github.com/repos/mochajs/mocha/statuses/0ed3a1137e124bafb191010265c1fdd142f7272b","head":{"label":"juergba:issue/3562","ref":"issue/3562","sha":"0ed3a1137e124bafb191010265c1fdd142f7272b","user":{"login":"juergba","id":44573692,"node_id":"MDQ6VXNlcjQ0NTczNjky","avatar_url":"https://avatars1.githubusercontent.com/u/44573692?v=4","gravatar_id":"","url":"https://api.github.com/users/juergba","html_url":"https://github.com/juergba","followers_url":"https://api.github.com/users/juergba/followers","following_url":"https://api.github.com/users/juergba/following{/other_user}","gists_url":"https://api.github.com/users/juergba/gists{/gist_id}","starred_url":"https://api.github.com/users/juergba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juergba/subscriptions","organizations_url":"https://api.github.com/users/juergba/orgs","repos_url":"https://api.github.com/users/juergba/repos","events_url":"https://api.github.com/users/juergba/events{/privacy}","received_events_url":"https://api.github.com/users/juergba/received_events","type":"User","site_admin":false},"repo":{"id":157212018,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcyMTIwMTg=","name":"mocha","full_name":"juergba/mocha","private":false,"owner":{"login":"juergba","id":44573692,"node_id":"MDQ6VXNlcjQ0NTczNjky","avatar_url":"https://avatars1.githubusercontent.com/u/44573692?v=4","gravatar_id":"","url":"https://api.github.com/users/juergba","html_url":"https://github.com/juergba","followers_url":"https://api.github.com/users/juergba/followers","following_url":"https://api.github.com/users/juergba/following{/other_user}","gists_url":"https://api.github.com/users/juergba/gists{/gist_id}","starred_url":"https://api.github.com/users/juergba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juergba/subscriptions","organizations_url":"https://api.github.com/users/juergba/orgs","repos_url":"https://api.github.com/users/juergba/repos","events_url":"https://api.github.com/users/juergba/events{/privacy}","received_events_url":"https://api.github.com/users/juergba/received_events","type":"User","site_admin":false},"html_url":"https://github.com/juergba/mocha","description":"☕️ simple, flexible, fun javascript test framework for node.js & the browser","fork":true,"url":"https://api.github.com/repos/juergba/mocha","forks_url":"https://api.github.com/repos/juergba/mocha/forks","keys_url":"https://api.github.com/repos/juergba/mocha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juergba/mocha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juergba/mocha/teams","hooks_url":"https://api.github.com/repos/juergba/mocha/hooks","issue_events_url":"https://api.github.com/repos/juergba/mocha/issues/events{/number}","events_url":"https://api.github.com/repos/juergba/mocha/events","assignees_url":"https://api.github.com/repos/juergba/mocha/assignees{/user}","branches_url":"https://api.github.com/repos/juergba/mocha/branches{/branch}","tags_url":"https://api.github.com/repos/juergba/mocha/tags","blobs_url":"https://api.github.com/repos/juergba/mocha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juergba/mocha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juergba/mocha/git/refs{/sha}","trees_url":"https://api.github.com/repos/juergba/mocha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juergba/mocha/statuses/{sha}","languages_url":"https://api.github.com/repos/juergba/mocha/languages","stargazers_url":"https://api.github.com/repos/juergba/mocha/stargazers","contributors_url":"https://api.github.com/repos/juergba/mocha/contributors","subscribers_url":"https://api.github.com/repos/juergba/mocha/subscribers","subscription_url":"https://api.github.com/repos/juergba/mocha/subscription","commits_url":"https://api.github.com/repos/juergba/mocha/commits{/sha}","git_commits_url":"https://api.github.com/repos/juergba/mocha/git/commits{/sha}","comments_url":"https://api.github.com/repos/juergba/mocha/comments{/number}","issue_comment_url":"https://api.github.com/repos/juergba/mocha/issues/comments{/number}","contents_url":"https://api.github.com/repos/juergba/mocha/contents/{+path}","compare_url":"https://api.github.com/repos/juergba/mocha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juergba/mocha/merges","archive_url":"https://api.github.com/repos/juergba/mocha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juergba/mocha/downloads","issues_url":"https://api.github.com/repos/juergba/mocha/issues{/number}","pulls_url":"https://api.github.com/repos/juergba/mocha/pulls{/number}","milestones_url":"https://api.github.com/repos/juergba/mocha/milestones{/number}","notifications_url":"https://api.github.com/repos/juergba/mocha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juergba/mocha/labels{/name}","releases_url":"https://api.github.com/repos/juergba/mocha/releases{/id}","deployments_url":"https://api.github.com/repos/juergba/mocha/deployments","created_at":"2018-11-12T12:42:37Z","updated_at":"2018-11-12T12:46:39Z","pushed_at":"2018-11-28T17:07:34Z","git_url":"git://github.com/juergba/mocha.git","ssh_url":"git@github.com:juergba/mocha.git","clone_url":"https://github.com/juergba/mocha.git","svn_url":"https://github.com/juergba/mocha","homepage":"https://mochajs.org","size":9503,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mochajs:master","ref":"master","sha":"9f02180f1c87cdcb0050c5e2f7b8c74911606435","user":{"login":"mochajs","id":8770005,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3NzAwMDU=","avatar_url":"https://avatars2.githubusercontent.com/u/8770005?v=4","gravatar_id":"","url":"https://api.github.com/users/mochajs","html_url":"https://github.com/mochajs","followers_url":"https://api.github.com/users/mochajs/followers","following_url":"https://api.github.com/users/mochajs/following{/other_user}","gists_url":"https://api.github.com/users/mochajs/gists{/gist_id}","starred_url":"https://api.github.com/users/mochajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mochajs/subscriptions","organizations_url":"https://api.github.com/users/mochajs/orgs","repos_url":"https://api.github.com/users/mochajs/repos","events_url":"https://api.github.com/users/mochajs/events{/privacy}","received_events_url":"https://api.github.com/users/mochajs/received_events","type":"Organization","site_admin":false},"repo":{"id":1451352,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxMzUy","name":"mocha","full_name":"mochajs/mocha","private":false,"owner":{"login":"mochajs","id":8770005,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3NzAwMDU=","avatar_url":"https://avatars2.githubusercontent.com/u/8770005?v=4","gravatar_id":"","url":"https://api.github.com/users/mochajs","html_url":"https://github.com/mochajs","followers_url":"https://api.github.com/users/mochajs/followers","following_url":"https://api.github.com/users/mochajs/following{/other_user}","gists_url":"https://api.github.com/users/mochajs/gists{/gist_id}","starred_url":"https://api.github.com/users/mochajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mochajs/subscriptions","organizations_url":"https://api.github.com/users/mochajs/orgs","repos_url":"https://api.github.com/users/mochajs/repos","events_url":"https://api.github.com/users/mochajs/events{/privacy}","received_events_url":"https://api.github.com/users/mochajs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mochajs/mocha","description":"☕️ simple, flexible, fun javascript test framework for node.js & the browser","fork":false,"url":"https://api.github.com/repos/mochajs/mocha","forks_url":"https://api.github.com/repos/mochajs/mocha/forks","keys_url":"https://api.github.com/repos/mochajs/mocha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mochajs/mocha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mochajs/mocha/teams","hooks_url":"https://api.github.com/repos/mochajs/mocha/hooks","issue_events_url":"https://api.github.com/repos/mochajs/mocha/issues/events{/number}","events_url":"https://api.github.com/repos/mochajs/mocha/events","assignees_url":"https://api.github.com/repos/mochajs/mocha/assignees{/user}","branches_url":"https://api.github.com/repos/mochajs/mocha/branches{/branch}","tags_url":"https://api.github.com/repos/mochajs/mocha/tags","blobs_url":"https://api.github.com/repos/mochajs/mocha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mochajs/mocha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mochajs/mocha/git/refs{/sha}","trees_url":"https://api.github.com/repos/mochajs/mocha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mochajs/mocha/statuses/{sha}","languages_url":"https://api.github.com/repos/mochajs/mocha/languages","stargazers_url":"https://api.github.com/repos/mochajs/mocha/stargazers","contributors_url":"https://api.github.com/repos/mochajs/mocha/contributors","subscribers_url":"https://api.github.com/repos/mochajs/mocha/subscribers","subscription_url":"https://api.github.com/repos/mochajs/mocha/subscription","commits_url":"https://api.github.com/repos/mochajs/mocha/commits{/sha}","git_commits_url":"https://api.github.com/repos/mochajs/mocha/git/commits{/sha}","comments_url":"https://api.github.com/repos/mochajs/mocha/comments{/number}","issue_comment_url":"https://api.github.com/repos/mochajs/mocha/issues/comments{/number}","contents_url":"https://api.github.com/repos/mochajs/mocha/contents/{+path}","compare_url":"https://api.github.com/repos/mochajs/mocha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mochajs/mocha/merges","archive_url":"https://api.github.com/repos/mochajs/mocha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mochajs/mocha/downloads","issues_url":"https://api.github.com/repos/mochajs/mocha/issues{/number}","pulls_url":"https://api.github.com/repos/mochajs/mocha/pulls{/number}","milestones_url":"https://api.github.com/repos/mochajs/mocha/milestones{/number}","notifications_url":"https://api.github.com/repos/mochajs/mocha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mochajs/mocha/labels{/name}","releases_url":"https://api.github.com/repos/mochajs/mocha/releases{/id}","deployments_url":"https://api.github.com/repos/mochajs/mocha/deployments","created_at":"2011-03-07T18:44:25Z","updated_at":"2018-11-28T11:59:58Z","pushed_at":"2018-11-28T17:07:37Z","git_url":"git://github.com/mochajs/mocha.git","ssh_url":"git@github.com:mochajs/mocha.git","clone_url":"https://github.com/mochajs/mocha.git","svn_url":"https://github.com/mochajs/mocha","homepage":"https://mochajs.org","size":10144,"stargazers_count":16699,"watchers_count":16699,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2283,"mirror_url":null,"archived":false,"open_issues_count":289,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2283,"open_issues":289,"watchers":16699,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/3582"},"html":{"href":"https://github.com/mochajs/mocha/pull/3582"},"issue":{"href":"https://api.github.com/repos/mochajs/mocha/issues/3582"},"comments":{"href":"https://api.github.com/repos/mochajs/mocha/issues/3582/comments"},"review_comments":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/3582/comments"},"review_comment":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/3582/commits"},"statuses":{"href":"https://api.github.com/repos/mochajs/mocha/statuses/0ed3a1137e124bafb191010265c1fdd142f7272b"}},"author_association":"NONE"}}
{"actor":{"display_login":"juergba"}}