{"action":"created","comment":{"url":"https://api.github.com/repos/antialias/refresh-clock/pulls/comments/52803403","id":52803403,"diff_hunk":"@@ -1,82 +1,70 @@\n \"use strict\";\n-var sinon = require('sinon');\n-var moment = require('moment');\n-var assert = require('assert');\n-var Mimic = require('mimic-webpack');\n-var RefreshClock;\n+require('babel-register');\n+const React = require('react');\n+const sinon = require('sinon');\n+const assert = require('assert');\n+const Mimic = require('mimic-webpack');\n+const mount = require('enzyme').mount;\n new Mimic({\n     domSupport: true,\n     loaders: {\n         use: ['webpack-compile-templates']\n     },\n     webpackConfig: {\n-        resolve: {\n-            extensions: ['.html']\n-        },\n         module: {\n             loaders: [{\n-                test: /\\.html$/,\n-                loader: 'webpack-compile-templates'\n-            },{\n                 test: /\\.scss$/,\n                 loader: 'null'\n             }]\n         }\n     }\n }).install();\n-RefreshClock = require('../index');\n+\n+const RefreshClock = require('../index.jsx');\n+\n describe(\"refresh-clock\", function () {\n-    var sandbox;\n-    var refreshView;\n-    beforeEach(function () {\n-        sandbox = sinon.sandbox.create();\n-    });\n-    afterEach(function () {\n-        sandbox.restore();\n-    });\n     it('should print the time when rendered', function () {\n-        refreshView = new RefreshClock();\n-        refreshView.render();\n-        assert(-1 !== refreshView.el.innerHTML.indexOf(moment().format('h:mm')));\n-    });\n-    it('should call window.location.reload when default _refresh is called', function () {\n-        sandbox.stub(window.location, 'reload');\n-        RefreshClock.prototype._refresh();\n-        sinon.assert.called(window.location.reload);\n-    });\n-    it('should default _refresh to RefreshClock.prototype._refresh', function () {\n-        var rc = new RefreshClock();\n-        assert.strictEqual(rc._refresh, RefreshClock.prototype._refresh);\n+        const refreshView = mount(React.createElement(RefreshClock, {\n+            loadTime: 'abc',\n+            refresh: function () {}\n+        }));\n+        assert(refreshView.text().indexOf('abc') !== -1);","path":"test/specs.js","position":64,"original_position":63,"commit_id":"0ff0ca38a0560543ebf3b32f25a700c0e338069b","original_commit_id":"8f693234b38eae6c5d82fb4572fce3386f3cdfcf","user":{"login":"robrichard","id":3814096,"avatar_url":"https://avatars.githubusercontent.com/u/3814096?v=3","gravatar_id":"","url":"https://api.github.com/users/robrichard","html_url":"https://github.com/robrichard","followers_url":"https://api.github.com/users/robrichard/followers","following_url":"https://api.github.com/users/robrichard/following{/other_user}","gists_url":"https://api.github.com/users/robrichard/gists{/gist_id}","starred_url":"https://api.github.com/users/robrichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrichard/subscriptions","organizations_url":"https://api.github.com/users/robrichard/orgs","repos_url":"https://api.github.com/users/robrichard/repos","events_url":"https://api.github.com/users/robrichard/events{/privacy}","received_events_url":"https://api.github.com/users/robrichard/received_events","type":"User","site_admin":false},"body":"good idea","created_at":"2016-02-12T21:53:01Z","updated_at":"2016-02-12T21:53:01Z","html_url":"https://github.com/antialias/refresh-clock/pull/1#discussion_r52803403","pull_request_url":"https://api.github.com/repos/antialias/refresh-clock/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/antialias/refresh-clock/pulls/comments/52803403"},"html":{"href":"https://github.com/antialias/refresh-clock/pull/1#discussion_r52803403"},"pull_request":{"href":"https://api.github.com/repos/antialias/refresh-clock/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/antialias/refresh-clock/pulls/1","id":59235446,"html_url":"https://github.com/antialias/refresh-clock/pull/1","diff_url":"https://github.com/antialias/refresh-clock/pull/1.diff","patch_url":"https://github.com/antialias/refresh-clock/pull/1.patch","issue_url":"https://api.github.com/repos/antialias/refresh-clock/issues/1","number":1,"state":"open","locked":false,"title":"rewrite in react","user":{"login":"robrichard","id":3814096,"avatar_url":"https://avatars.githubusercontent.com/u/3814096?v=3","gravatar_id":"","url":"https://api.github.com/users/robrichard","html_url":"https://github.com/robrichard","followers_url":"https://api.github.com/users/robrichard/followers","following_url":"https://api.github.com/users/robrichard/following{/other_user}","gists_url":"https://api.github.com/users/robrichard/gists{/gist_id}","starred_url":"https://api.github.com/users/robrichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrichard/subscriptions","organizations_url":"https://api.github.com/users/robrichard/orgs","repos_url":"https://api.github.com/users/robrichard/repos","events_url":"https://api.github.com/users/robrichard/events{/privacy}","received_events_url":"https://api.github.com/users/robrichard/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-12T21:44:19Z","updated_at":"2016-02-12T21:53:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06556c4f1a765224d85c5d8da971634e51d1a744","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/antialias/refresh-clock/pulls/1/commits","review_comments_url":"https://api.github.com/repos/antialias/refresh-clock/pulls/1/comments","review_comment_url":"https://api.github.com/repos/antialias/refresh-clock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/antialias/refresh-clock/issues/1/comments","statuses_url":"https://api.github.com/repos/antialias/refresh-clock/statuses/0ff0ca38a0560543ebf3b32f25a700c0e338069b","head":{"label":"robrichard:master","ref":"master","sha":"0ff0ca38a0560543ebf3b32f25a700c0e338069b","user":{"login":"robrichard","id":3814096,"avatar_url":"https://avatars.githubusercontent.com/u/3814096?v=3","gravatar_id":"","url":"https://api.github.com/users/robrichard","html_url":"https://github.com/robrichard","followers_url":"https://api.github.com/users/robrichard/followers","following_url":"https://api.github.com/users/robrichard/following{/other_user}","gists_url":"https://api.github.com/users/robrichard/gists{/gist_id}","starred_url":"https://api.github.com/users/robrichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrichard/subscriptions","organizations_url":"https://api.github.com/users/robrichard/orgs","repos_url":"https://api.github.com/users/robrichard/repos","events_url":"https://api.github.com/users/robrichard/events{/privacy}","received_events_url":"https://api.github.com/users/robrichard/received_events","type":"User","site_admin":false},"repo":{"id":51618285,"name":"refresh-clock","full_name":"robrichard/refresh-clock","owner":{"login":"robrichard","id":3814096,"avatar_url":"https://avatars.githubusercontent.com/u/3814096?v=3","gravatar_id":"","url":"https://api.github.com/users/robrichard","html_url":"https://github.com/robrichard","followers_url":"https://api.github.com/users/robrichard/followers","following_url":"https://api.github.com/users/robrichard/following{/other_user}","gists_url":"https://api.github.com/users/robrichard/gists{/gist_id}","starred_url":"https://api.github.com/users/robrichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrichard/subscriptions","organizations_url":"https://api.github.com/users/robrichard/orgs","repos_url":"https://api.github.com/users/robrichard/repos","events_url":"https://api.github.com/users/robrichard/events{/privacy}","received_events_url":"https://api.github.com/users/robrichard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robrichard/refresh-clock","description":null,"fork":true,"url":"https://api.github.com/repos/robrichard/refresh-clock","forks_url":"https://api.github.com/repos/robrichard/refresh-clock/forks","keys_url":"https://api.github.com/repos/robrichard/refresh-clock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robrichard/refresh-clock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robrichard/refresh-clock/teams","hooks_url":"https://api.github.com/repos/robrichard/refresh-clock/hooks","issue_events_url":"https://api.github.com/repos/robrichard/refresh-clock/issues/events{/number}","events_url":"https://api.github.com/repos/robrichard/refresh-clock/events","assignees_url":"https://api.github.com/repos/robrichard/refresh-clock/assignees{/user}","branches_url":"https://api.github.com/repos/robrichard/refresh-clock/branches{/branch}","tags_url":"https://api.github.com/repos/robrichard/refresh-clock/tags","blobs_url":"https://api.github.com/repos/robrichard/refresh-clock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robrichard/refresh-clock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robrichard/refresh-clock/git/refs{/sha}","trees_url":"https://api.github.com/repos/robrichard/refresh-clock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robrichard/refresh-clock/statuses/{sha}","languages_url":"https://api.github.com/repos/robrichard/refresh-clock/languages","stargazers_url":"https://api.github.com/repos/robrichard/refresh-clock/stargazers","contributors_url":"https://api.github.com/repos/robrichard/refresh-clock/contributors","subscribers_url":"https://api.github.com/repos/robrichard/refresh-clock/subscribers","subscription_url":"https://api.github.com/repos/robrichard/refresh-clock/subscription","commits_url":"https://api.github.com/repos/robrichard/refresh-clock/commits{/sha}","git_commits_url":"https://api.github.com/repos/robrichard/refresh-clock/git/commits{/sha}","comments_url":"https://api.github.com/repos/robrichard/refresh-clock/comments{/number}","issue_comment_url":"https://api.github.com/repos/robrichard/refresh-clock/issues/comments{/number}","contents_url":"https://api.github.com/repos/robrichard/refresh-clock/contents/{+path}","compare_url":"https://api.github.com/repos/robrichard/refresh-clock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robrichard/refresh-clock/merges","archive_url":"https://api.github.com/repos/robrichard/refresh-clock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robrichard/refresh-clock/downloads","issues_url":"https://api.github.com/repos/robrichard/refresh-clock/issues{/number}","pulls_url":"https://api.github.com/repos/robrichard/refresh-clock/pulls{/number}","milestones_url":"https://api.github.com/repos/robrichard/refresh-clock/milestones{/number}","notifications_url":"https://api.github.com/repos/robrichard/refresh-clock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robrichard/refresh-clock/labels{/name}","releases_url":"https://api.github.com/repos/robrichard/refresh-clock/releases{/id}","deployments_url":"https://api.github.com/repos/robrichard/refresh-clock/deployments","created_at":"2016-02-12T21:40:01Z","updated_at":"2016-02-12T21:40:02Z","pushed_at":"2016-02-12T21:49:52Z","git_url":"git://github.com/robrichard/refresh-clock.git","ssh_url":"git@github.com:robrichard/refresh-clock.git","clone_url":"https://github.com/robrichard/refresh-clock.git","svn_url":"https://github.com/robrichard/refresh-clock","homepage":null,"size":85,"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":"antialias:master","ref":"master","sha":"9a8e36b497778f2daed8e97358267763cdd37c42","user":{"login":"antialias","id":447517,"avatar_url":"https://avatars.githubusercontent.com/u/447517?v=3","gravatar_id":"","url":"https://api.github.com/users/antialias","html_url":"https://github.com/antialias","followers_url":"https://api.github.com/users/antialias/followers","following_url":"https://api.github.com/users/antialias/following{/other_user}","gists_url":"https://api.github.com/users/antialias/gists{/gist_id}","starred_url":"https://api.github.com/users/antialias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antialias/subscriptions","organizations_url":"https://api.github.com/users/antialias/orgs","repos_url":"https://api.github.com/users/antialias/repos","events_url":"https://api.github.com/users/antialias/events{/privacy}","received_events_url":"https://api.github.com/users/antialias/received_events","type":"User","site_admin":false},"repo":{"id":51093479,"name":"refresh-clock","full_name":"antialias/refresh-clock","owner":{"login":"antialias","id":447517,"avatar_url":"https://avatars.githubusercontent.com/u/447517?v=3","gravatar_id":"","url":"https://api.github.com/users/antialias","html_url":"https://github.com/antialias","followers_url":"https://api.github.com/users/antialias/followers","following_url":"https://api.github.com/users/antialias/following{/other_user}","gists_url":"https://api.github.com/users/antialias/gists{/gist_id}","starred_url":"https://api.github.com/users/antialias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antialias/subscriptions","organizations_url":"https://api.github.com/users/antialias/orgs","repos_url":"https://api.github.com/users/antialias/repos","events_url":"https://api.github.com/users/antialias/events{/privacy}","received_events_url":"https://api.github.com/users/antialias/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antialias/refresh-clock","description":null,"fork":false,"url":"https://api.github.com/repos/antialias/refresh-clock","forks_url":"https://api.github.com/repos/antialias/refresh-clock/forks","keys_url":"https://api.github.com/repos/antialias/refresh-clock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antialias/refresh-clock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antialias/refresh-clock/teams","hooks_url":"https://api.github.com/repos/antialias/refresh-clock/hooks","issue_events_url":"https://api.github.com/repos/antialias/refresh-clock/issues/events{/number}","events_url":"https://api.github.com/repos/antialias/refresh-clock/events","assignees_url":"https://api.github.com/repos/antialias/refresh-clock/assignees{/user}","branches_url":"https://api.github.com/repos/antialias/refresh-clock/branches{/branch}","tags_url":"https://api.github.com/repos/antialias/refresh-clock/tags","blobs_url":"https://api.github.com/repos/antialias/refresh-clock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antialias/refresh-clock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antialias/refresh-clock/git/refs{/sha}","trees_url":"https://api.github.com/repos/antialias/refresh-clock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antialias/refresh-clock/statuses/{sha}","languages_url":"https://api.github.com/repos/antialias/refresh-clock/languages","stargazers_url":"https://api.github.com/repos/antialias/refresh-clock/stargazers","contributors_url":"https://api.github.com/repos/antialias/refresh-clock/contributors","subscribers_url":"https://api.github.com/repos/antialias/refresh-clock/subscribers","subscription_url":"https://api.github.com/repos/antialias/refresh-clock/subscription","commits_url":"https://api.github.com/repos/antialias/refresh-clock/commits{/sha}","git_commits_url":"https://api.github.com/repos/antialias/refresh-clock/git/commits{/sha}","comments_url":"https://api.github.com/repos/antialias/refresh-clock/comments{/number}","issue_comment_url":"https://api.github.com/repos/antialias/refresh-clock/issues/comments{/number}","contents_url":"https://api.github.com/repos/antialias/refresh-clock/contents/{+path}","compare_url":"https://api.github.com/repos/antialias/refresh-clock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antialias/refresh-clock/merges","archive_url":"https://api.github.com/repos/antialias/refresh-clock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antialias/refresh-clock/downloads","issues_url":"https://api.github.com/repos/antialias/refresh-clock/issues{/number}","pulls_url":"https://api.github.com/repos/antialias/refresh-clock/pulls{/number}","milestones_url":"https://api.github.com/repos/antialias/refresh-clock/milestones{/number}","notifications_url":"https://api.github.com/repos/antialias/refresh-clock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antialias/refresh-clock/labels{/name}","releases_url":"https://api.github.com/repos/antialias/refresh-clock/releases{/id}","deployments_url":"https://api.github.com/repos/antialias/refresh-clock/deployments","created_at":"2016-02-04T17:41:20Z","updated_at":"2016-02-04T17:41:27Z","pushed_at":"2016-02-12T21:49:53Z","git_url":"git://github.com/antialias/refresh-clock.git","ssh_url":"git@github.com:antialias/refresh-clock.git","clone_url":"https://github.com/antialias/refresh-clock.git","svn_url":"https://github.com/antialias/refresh-clock","homepage":null,"size":90,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/antialias/refresh-clock/pulls/1"},"html":{"href":"https://github.com/antialias/refresh-clock/pull/1"},"issue":{"href":"https://api.github.com/repos/antialias/refresh-clock/issues/1"},"comments":{"href":"https://api.github.com/repos/antialias/refresh-clock/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/antialias/refresh-clock/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/antialias/refresh-clock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/antialias/refresh-clock/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/antialias/refresh-clock/statuses/0ff0ca38a0560543ebf3b32f25a700c0e338069b"}}}}