GitHub PullRequestReviewCommentEvent at 2014-07-06 00:57:02
Repository: mercury
Actor: Raynos
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Raynos/mercury/pulls/comments/14573341","id":14573341,"diff_hunk":"@@ -0,0 +1,27 @@\n+var assert = require(\"assert\");\n+var select = require(\"vtree-select\");\n+var render = require('./render.js');\n+\n+var state = {\n+    description: 'server description',\n+    events: { add: {} },\n+    items: [{\n+        name: 'server item name'\n+    }]\n+};\n+\n+var tree = render(state);\n+\n+// Assert description\n+var spanText = select(\"div:root > span\")(tree)[0].children[0].text;\n+assert(spanText === state.description);\n+\n+// Assert items\n+var items = select(\"div ul li span\")(tree);\n+assert(items.length === state.items.length);\n+items.forEach(function(item, i) {\n+  assert.equal(item.children[0].text, state.items[i].name);\n+});\n+\n+// Assert name input\n+assert(select(\"input[name=name]\")(tree));","path":"examples/server-rendering/test.js","position":27,"original_position":27,"commit_id":"6d5f8e55fb8086c64ab2a28320786833b659944b","original_commit_id":"6d5f8e55fb8086c64ab2a28320786833b659944b","user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?","gravatar_id":"d840cb1fb7e828284011cc08f40a1015","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"body":"`assert.ok()` is preferred","created_at":"2014-07-06T00:57:02Z","updated_at":"2014-07-06T00:57:02Z","html_url":"https://github.com/Raynos/mercury/pull/60#discussion_r14573341","pull_request_url":"https://api.github.com/repos/Raynos/mercury/pulls/60","_links":{"self":{"href":"https://api.github.com/repos/Raynos/mercury/pulls/comments/14573341"},"html":{"href":"https://github.com/Raynos/mercury/pull/60#discussion_r14573341"},"pull_request":{"href":"https://api.github.com/repos/Raynos/mercury/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/Raynos/mercury/pulls/60","id":18014554,"html_url":"https://github.com/Raynos/mercury/pull/60","diff_url":"https://github.com/Raynos/mercury/pull/60.diff","patch_url":"https://github.com/Raynos/mercury/pull/60.patch","issue_url":"https://api.github.com/repos/Raynos/mercury/issues/60","number":60,"state":"open","title":"Add vtree tests for server rendering example","user":{"login":"parshap","id":332258,"avatar_url":"https://avatars.githubusercontent.com/u/332258?","gravatar_id":"1e919fea60e17cbe48bbbd2935adb61f","url":"https://api.github.com/users/parshap","html_url":"https://github.com/parshap","followers_url":"https://api.github.com/users/parshap/followers","following_url":"https://api.github.com/users/parshap/following{/other_user}","gists_url":"https://api.github.com/users/parshap/gists{/gist_id}","starred_url":"https://api.github.com/users/parshap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parshap/subscriptions","organizations_url":"https://api.github.com/users/parshap/orgs","repos_url":"https://api.github.com/users/parshap/repos","events_url":"https://api.github.com/users/parshap/events{/privacy}","received_events_url":"https://api.github.com/users/parshap/received_events","type":"User","site_admin":false},"body":"This adds tests against the vtree structure for the *server-rendering* example. These are UI tests that can run on the server. This also shows how to use *[vtree-select][]* to make traversing a vtree a bit easier. \r\n\r\nIt's possible to write a higher order selector module that can select from both a vtree and a real dom and return the same objects so you could write tests that run both on the server and against an actual dom.\r\n\r\n[vtree-select]: https://www.npmjs.org/package/vtree-structure","created_at":"2014-07-06T00:42:58Z","updated_at":"2014-07-06T00:57:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9aedd3ffdfaf9a12abf5631989a96bc01434a6ab","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Raynos/mercury/pulls/60/commits","review_comments_url":"https://api.github.com/repos/Raynos/mercury/pulls/60/comments","review_comment_url":"https://api.github.com/repos/Raynos/mercury/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Raynos/mercury/issues/60/comments","statuses_url":"https://api.github.com/repos/Raynos/mercury/statuses/6d5f8e55fb8086c64ab2a28320786833b659944b","head":{"label":"parshap:vtree-tests","ref":"vtree-tests","sha":"6d5f8e55fb8086c64ab2a28320786833b659944b","user":{"login":"parshap","id":332258,"avatar_url":"https://avatars.githubusercontent.com/u/332258?","gravatar_id":"1e919fea60e17cbe48bbbd2935adb61f","url":"https://api.github.com/users/parshap","html_url":"https://github.com/parshap","followers_url":"https://api.github.com/users/parshap/followers","following_url":"https://api.github.com/users/parshap/following{/other_user}","gists_url":"https://api.github.com/users/parshap/gists{/gist_id}","starred_url":"https://api.github.com/users/parshap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parshap/subscriptions","organizations_url":"https://api.github.com/users/parshap/orgs","repos_url":"https://api.github.com/users/parshap/repos","events_url":"https://api.github.com/users/parshap/events{/privacy}","received_events_url":"https://api.github.com/users/parshap/received_events","type":"User","site_admin":false},"repo":{"id":21530787,"name":"mercury","full_name":"parshap/mercury","owner":{"login":"parshap","id":332258,"avatar_url":"https://avatars.githubusercontent.com/u/332258?","gravatar_id":"1e919fea60e17cbe48bbbd2935adb61f","url":"https://api.github.com/users/parshap","html_url":"https://github.com/parshap","followers_url":"https://api.github.com/users/parshap/followers","following_url":"https://api.github.com/users/parshap/following{/other_user}","gists_url":"https://api.github.com/users/parshap/gists{/gist_id}","starred_url":"https://api.github.com/users/parshap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parshap/subscriptions","organizations_url":"https://api.github.com/users/parshap/orgs","repos_url":"https://api.github.com/users/parshap/repos","events_url":"https://api.github.com/users/parshap/events{/privacy}","received_events_url":"https://api.github.com/users/parshap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/parshap/mercury","description":"A truly modular frontend framework","fork":true,"url":"https://api.github.com/repos/parshap/mercury","forks_url":"https://api.github.com/repos/parshap/mercury/forks","keys_url":"https://api.github.com/repos/parshap/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parshap/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parshap/mercury/teams","hooks_url":"https://api.github.com/repos/parshap/mercury/hooks","issue_events_url":"https://api.github.com/repos/parshap/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/parshap/mercury/events","assignees_url":"https://api.github.com/repos/parshap/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/parshap/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/parshap/mercury/tags","blobs_url":"https://api.github.com/repos/parshap/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parshap/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parshap/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/parshap/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parshap/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/parshap/mercury/languages","stargazers_url":"https://api.github.com/repos/parshap/mercury/stargazers","contributors_url":"https://api.github.com/repos/parshap/mercury/contributors","subscribers_url":"https://api.github.com/repos/parshap/mercury/subscribers","subscription_url":"https://api.github.com/repos/parshap/mercury/subscription","commits_url":"https://api.github.com/repos/parshap/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/parshap/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/parshap/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/parshap/mercury/issues/comments/{number}","contents_url":"https://api.github.com/repos/parshap/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/parshap/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parshap/mercury/merges","archive_url":"https://api.github.com/repos/parshap/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parshap/mercury/downloads","issues_url":"https://api.github.com/repos/parshap/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/parshap/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/parshap/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/parshap/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parshap/mercury/labels{/name}","releases_url":"https://api.github.com/repos/parshap/mercury/releases{/id}","created_at":"2014-07-06T00:38:36Z","updated_at":"2014-07-05T18:16:18Z","pushed_at":"2014-07-06T00:38:51Z","git_url":"git://github.com/parshap/mercury.git","ssh_url":"git@github.com:parshap/mercury.git","clone_url":"https://github.com/parshap/mercury.git","svn_url":"https://github.com/parshap/mercury","homepage":"http://raynos.github.io/mercury/","size":3253,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Raynos:master","ref":"master","sha":"d01fd4a0715d2197dd20da7071b7f743bc034b70","user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?","gravatar_id":"d840cb1fb7e828284011cc08f40a1015","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"repo":{"id":18319723,"name":"mercury","full_name":"Raynos/mercury","owner":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?","gravatar_id":"d840cb1fb7e828284011cc08f40a1015","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Raynos/mercury","description":"A truly modular frontend framework","fork":false,"url":"https://api.github.com/repos/Raynos/mercury","forks_url":"https://api.github.com/repos/Raynos/mercury/forks","keys_url":"https://api.github.com/repos/Raynos/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Raynos/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Raynos/mercury/teams","hooks_url":"https://api.github.com/repos/Raynos/mercury/hooks","issue_events_url":"https://api.github.com/repos/Raynos/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Raynos/mercury/events","assignees_url":"https://api.github.com/repos/Raynos/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Raynos/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Raynos/mercury/tags","blobs_url":"https://api.github.com/repos/Raynos/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Raynos/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Raynos/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Raynos/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Raynos/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Raynos/mercury/languages","stargazers_url":"https://api.github.com/repos/Raynos/mercury/stargazers","contributors_url":"https://api.github.com/repos/Raynos/mercury/contributors","subscribers_url":"https://api.github.com/repos/Raynos/mercury/subscribers","subscription_url":"https://api.github.com/repos/Raynos/mercury/subscription","commits_url":"https://api.github.com/repos/Raynos/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Raynos/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Raynos/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Raynos/mercury/issues/comments/{number}","contents_url":"https://api.github.com/repos/Raynos/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Raynos/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Raynos/mercury/merges","archive_url":"https://api.github.com/repos/Raynos/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Raynos/mercury/downloads","issues_url":"https://api.github.com/repos/Raynos/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Raynos/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Raynos/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Raynos/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Raynos/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Raynos/mercury/releases{/id}","created_at":"2014-04-01T06:20:47Z","updated_at":"2014-07-05T18:16:18Z","pushed_at":"2014-07-06T00:51:28Z","git_url":"git://github.com/Raynos/mercury.git","ssh_url":"git@github.com:Raynos/mercury.git","clone_url":"https://github.com/Raynos/mercury.git","svn_url":"https://github.com/Raynos/mercury","homepage":"http://raynos.github.io/mercury/","size":3253,"stargazers_count":166,"watchers_count":166,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":12,"mirror_url":null,"open_issues_count":22,"forks":12,"open_issues":22,"watchers":166,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Raynos/mercury/pulls/60"},"html":{"href":"https://github.com/Raynos/mercury/pull/60"},"issue":{"href":"https://api.github.com/repos/Raynos/mercury/issues/60"},"comments":{"href":"https://api.github.com/repos/Raynos/mercury/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/Raynos/mercury/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/Raynos/mercury/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Raynos/mercury/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/Raynos/mercury/statuses/6d5f8e55fb8086c64ab2a28320786833b659944b"}}}}