GitHub PullRequestReviewCommentEvent at 2014-11-05 03:25:40
Repository: analytics.js-integrations
Actor: calvinfo
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/comments/19853442","id":19853442,"diff_hunk":"@@ -58,6 +58,46 @@ describe('Amplitude', function(){\n         analytics.page();\n         analytics.called(amplitude.load);\n       });\n+\n+      it('should set domain', function(){\n+        analytics.spy(amplitude, 'setDomain');\n+        analytics.initialize();\n+        analytics.page();\n+        analytics.called(amplitude.setDomain);","path":"lib/amplitude/test.js","position":9,"original_position":9,"commit_id":"d439322b98a0d74d75174debd8990918fe180fe5","original_commit_id":"d439322b98a0d74d75174debd8990918fe180fe5","user":{"login":"calvinfo","id":487539,"avatar_url":"https://avatars.githubusercontent.com/u/487539?v=2","gravatar_id":"","url":"https://api.github.com/users/calvinfo","html_url":"https://github.com/calvinfo","followers_url":"https://api.github.com/users/calvinfo/followers","following_url":"https://api.github.com/users/calvinfo/following{/other_user}","gists_url":"https://api.github.com/users/calvinfo/gists{/gist_id}","starred_url":"https://api.github.com/users/calvinfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvinfo/subscriptions","organizations_url":"https://api.github.com/users/calvinfo/orgs","repos_url":"https://api.github.com/users/calvinfo/repos","events_url":"https://api.github.com/users/calvinfo/events{/privacy}","received_events_url":"https://api.github.com/users/calvinfo/received_events","type":"User","site_admin":false},"body":"can we add a check to make sure it's called with the `window.location.href`?","created_at":"2014-11-05T03:25:40Z","updated_at":"2014-11-05T03:25:40Z","html_url":"https://github.com/segmentio/analytics.js-integrations/pull/450#discussion_r19853442","pull_request_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/450","_links":{"self":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/comments/19853442"},"html":{"href":"https://github.com/segmentio/analytics.js-integrations/pull/450#discussion_r19853442"},"pull_request":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/450"}}},"pull_request":{"url":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/450","id":23881114,"html_url":"https://github.com/segmentio/analytics.js-integrations/pull/450","diff_url":"https://github.com/segmentio/analytics.js-integrations/pull/450.diff","patch_url":"https://github.com/segmentio/analytics.js-integrations/pull/450.patch","issue_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues/450","number":450,"state":"open","locked":false,"title":"Amplitude: added setDomain and setGlobalUserProperties to init","user":{"login":"amillet89","id":1464190,"avatar_url":"https://avatars.githubusercontent.com/u/1464190?v=2","gravatar_id":"","url":"https://api.github.com/users/amillet89","html_url":"https://github.com/amillet89","followers_url":"https://api.github.com/users/amillet89/followers","following_url":"https://api.github.com/users/amillet89/following{/other_user}","gists_url":"https://api.github.com/users/amillet89/gists{/gist_id}","starred_url":"https://api.github.com/users/amillet89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amillet89/subscriptions","organizations_url":"https://api.github.com/users/amillet89/orgs","repos_url":"https://api.github.com/users/amillet89/repos","events_url":"https://api.github.com/users/amillet89/events{/privacy}","received_events_url":"https://api.github.com/users/amillet89/received_events","type":"User","site_admin":false},"body":"fixes https://github.com/segmentio/analytics.js-integrations/pull/448\r\n\r\n@DirtyAnalytics split the setDomain and setGlobalUserProperties into separate methods to be able to test them. For each of these we have two tests, one that checks that setDomain (setGlobalUserProperties) was called, and another that checks that the setDomain method calls the window.amplitude.setDomain with the right params\r\n\r\n@yields : @calvinfo and I wondered if there's a better way to test these two methods if we kept them inside initialize? ","created_at":"2014-11-05T02:50:54Z","updated_at":"2014-11-05T03:25:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69c1ee96150325eb95e9117a0a27702e0a0eb53a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/450/commits","review_comments_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/450/comments","review_comment_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/comments/{number}","comments_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues/450/comments","statuses_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/statuses/d439322b98a0d74d75174debd8990918fe180fe5","head":{"label":"segmentio:fix/amplitude","ref":"fix/amplitude","sha":"d439322b98a0d74d75174debd8990918fe180fe5","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=2","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":14219761,"name":"analytics.js-integrations","full_name":"segmentio/analytics.js-integrations","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=2","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/analytics.js-integrations","description":"All of the third-party analytics.js integrations.","fork":false,"url":"https://api.github.com/repos/segmentio/analytics.js-integrations","forks_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/forks","keys_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/teams","hooks_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/hooks","issue_events_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/events","assignees_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/tags","blobs_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/languages","stargazers_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/stargazers","contributors_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/contributors","subscribers_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/subscribers","subscription_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/subscription","commits_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues/comments/{number}","contents_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/merges","archive_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/downloads","issues_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/releases{/id}","created_at":"2013-11-08T00:09:00Z","updated_at":"2014-11-04T23:42:13Z","pushed_at":"2014-11-05T02:48:28Z","git_url":"git://github.com/segmentio/analytics.js-integrations.git","ssh_url":"git@github.com:segmentio/analytics.js-integrations.git","clone_url":"https://github.com/segmentio/analytics.js-integrations.git","svn_url":"https://github.com/segmentio/analytics.js-integrations","homepage":null,"size":14598,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":51,"forks":87,"open_issues":51,"watchers":47,"default_branch":"master"}},"base":{"label":"segmentio:master","ref":"master","sha":"5c3d72a01755b7e2ac9722d033358483e8589a3d","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=2","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":14219761,"name":"analytics.js-integrations","full_name":"segmentio/analytics.js-integrations","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=2","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/analytics.js-integrations","description":"All of the third-party analytics.js integrations.","fork":false,"url":"https://api.github.com/repos/segmentio/analytics.js-integrations","forks_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/forks","keys_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/teams","hooks_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/hooks","issue_events_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/events","assignees_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/tags","blobs_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/languages","stargazers_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/stargazers","contributors_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/contributors","subscribers_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/subscribers","subscription_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/subscription","commits_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues/comments/{number}","contents_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/merges","archive_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/downloads","issues_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/analytics.js-integrations/releases{/id}","created_at":"2013-11-08T00:09:00Z","updated_at":"2014-11-04T23:42:13Z","pushed_at":"2014-11-05T02:48:28Z","git_url":"git://github.com/segmentio/analytics.js-integrations.git","ssh_url":"git@github.com:segmentio/analytics.js-integrations.git","clone_url":"https://github.com/segmentio/analytics.js-integrations.git","svn_url":"https://github.com/segmentio/analytics.js-integrations","homepage":null,"size":14598,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":51,"forks":87,"open_issues":51,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/450"},"html":{"href":"https://github.com/segmentio/analytics.js-integrations/pull/450"},"issue":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues/450"},"comments":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/issues/450/comments"},"review_comments":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/450/comments"},"review_comment":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/pulls/450/commits"},"statuses":{"href":"https://api.github.com/repos/segmentio/analytics.js-integrations/statuses/d439322b98a0d74d75174debd8990918fe180fe5"}}}}