{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/comments/70518035","id":70518035,"diff_hunk":"@@ -219,6 +219,31 @@ expect(result).to...;\n done();\n ```\n \n+## Describe Hooks\n+All hooks should be invoked with an optional description, making it easier to pinpoint errors in your tests; reference: [mochajs.org](https://mochajs.org/)\n+\n+Example:\n+\n+#### Good\n+\n+```js\n+beforeEach(function namedFun() {\n+  // beforeEach:namedFun\n+});","path":"style-guide.md","position":26,"original_position":14,"commit_id":"9388af1b75cb19fca2bec48c60943f2a581089f5","original_commit_id":"a0498519c1ca509c9094991e3c61f7aace306692","user":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"body":"I've thought it through and I think we should move this to the bad section. We should only allow named functions that are passed in directly. ie:\r\n\r\nGood:\r\n\r\n```js\r\nbeforeEach(namedFunction);\r\n```\r\n\r\nBad:\r\n\r\n```js\r\nbeforeEach(function namedFun() {\r\n  // beforeEach:namedFun\r\n});\r\n```","created_at":"2016-07-12T20:41:25Z","updated_at":"2016-07-12T20:41:25Z","html_url":"https://github.com/strongloop/loopback-knowledge-base/pull/1#discussion_r70518035","pull_request_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/comments/70518035"},"html":{"href":"https://github.com/strongloop/loopback-knowledge-base/pull/1#discussion_r70518035"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/1","id":77004265,"html_url":"https://github.com/strongloop/loopback-knowledge-base/pull/1","diff_url":"https://github.com/strongloop/loopback-knowledge-base/pull/1.diff","patch_url":"https://github.com/strongloop/loopback-knowledge-base/pull/1.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues/1","number":1,"state":"open","locked":false,"title":"Describe hooks","user":{"login":"Amir-61","id":10672146,"avatar_url":"https://avatars.githubusercontent.com/u/10672146?v=3","gravatar_id":"","url":"https://api.github.com/users/Amir-61","html_url":"https://github.com/Amir-61","followers_url":"https://api.github.com/users/Amir-61/followers","following_url":"https://api.github.com/users/Amir-61/following{/other_user}","gists_url":"https://api.github.com/users/Amir-61/gists{/gist_id}","starred_url":"https://api.github.com/users/Amir-61/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amir-61/subscriptions","organizations_url":"https://api.github.com/users/Amir-61/orgs","repos_url":"https://api.github.com/users/Amir-61/repos","events_url":"https://api.github.com/users/Amir-61/events{/privacy}","received_events_url":"https://api.github.com/users/Amir-61/received_events","type":"User","site_admin":false},"body":"This doc suggests describing hooks in tests either with a named function or optional description argument; however, if the team prefers one over the other we can go for that; so lets discuss it here and see what team prefers.\r\n\r\nAlso I just copied the context of this `describe hooks` from https://mochajs.org/; is saying `reference: [mochajs.org](https://mochajs.org/)` enough in legal perspective?\r\n\r\nI'm personally fine with both; I just don't like to have a hook without any description like:\r\n\r\n```\r\nbeforeEach(function() {\r\n   ...\r\n});\r\n```\r\n\r\nto: / @strongloop/loopback-dev @bajtos\r\n\r\nPlease feel free to have changes directly in this PR.\r\n\r\nConnect to https://github.com/strongloop/loopback-datasource-juggler/pull/864/files/b4a7244a9c58ea6aa2891b61de5bfde86909a199#r70298930\r\n\r\nThanks!","created_at":"2016-07-11T18:54:22Z","updated_at":"2016-07-12T20:41:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf1b87b2a11fa921c6fc5b484de92fb9f70bb31a","assignee":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"assignees":[{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},{"login":"Amir-61","id":10672146,"avatar_url":"https://avatars.githubusercontent.com/u/10672146?v=3","gravatar_id":"","url":"https://api.github.com/users/Amir-61","html_url":"https://github.com/Amir-61","followers_url":"https://api.github.com/users/Amir-61/followers","following_url":"https://api.github.com/users/Amir-61/following{/other_user}","gists_url":"https://api.github.com/users/Amir-61/gists{/gist_id}","starred_url":"https://api.github.com/users/Amir-61/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amir-61/subscriptions","organizations_url":"https://api.github.com/users/Amir-61/orgs","repos_url":"https://api.github.com/users/Amir-61/repos","events_url":"https://api.github.com/users/Amir-61/events{/privacy}","received_events_url":"https://api.github.com/users/Amir-61/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/1/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/1/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues/1/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/statuses/9388af1b75cb19fca2bec48c60943f2a581089f5","head":{"label":"strongloop:describe_hooks","ref":"describe_hooks","sha":"9388af1b75cb19fca2bec48c60943f2a581089f5","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":62915590,"name":"loopback-knowledge-base","full_name":"strongloop/loopback-knowledge-base","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-knowledge-base","description":"Documentation for LoopBack contributors and maintainers.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-knowledge-base","forks_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/deployments","created_at":"2016-07-08T20:28:35Z","updated_at":"2016-07-11T21:33:08Z","pushed_at":"2016-07-12T18:33:44Z","git_url":"git://github.com/strongloop/loopback-knowledge-base.git","ssh_url":"git@github.com:strongloop/loopback-knowledge-base.git","clone_url":"https://github.com/strongloop/loopback-knowledge-base.git","svn_url":"https://github.com/strongloop/loopback-knowledge-base","homepage":"","size":10,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"1800af2eb017ad829e36aaec29f05e518e96769b","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":62915590,"name":"loopback-knowledge-base","full_name":"strongloop/loopback-knowledge-base","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-knowledge-base","description":"Documentation for LoopBack contributors and maintainers.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-knowledge-base","forks_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback-knowledge-base/deployments","created_at":"2016-07-08T20:28:35Z","updated_at":"2016-07-11T21:33:08Z","pushed_at":"2016-07-12T18:33:44Z","git_url":"git://github.com/strongloop/loopback-knowledge-base.git","ssh_url":"git@github.com:strongloop/loopback-knowledge-base.git","clone_url":"https://github.com/strongloop/loopback-knowledge-base.git","svn_url":"https://github.com/strongloop/loopback-knowledge-base","homepage":"","size":10,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/1"},"html":{"href":"https://github.com/strongloop/loopback-knowledge-base/pull/1"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues/1"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-knowledge-base/statuses/9388af1b75cb19fca2bec48c60943f2a581089f5"}}}}
{"actor":{"display_login":"superkhau"}}