{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-testing/gemini/pulls/comments/70982433","id":70982433,"diff_hunk":"@@ -0,0 +1,76 @@\n+'use strict';\n+\n+const fs = require('q-io/fs');\n+const q = require('q');\n+const temp = require('lib/temp');\n+const Image = require('lib/image');\n+const NoRefImageError = require('lib/errors/no-ref-image-error');\n+const Tester = require('lib/state-processor/capture-processor/tester');\n+\n+describe('state-processor/capture-processor/tester', () => {\n+    const sandbox = sinon.sandbox.create();\n+\n+    afterEach(() => sandbox.restore());\n+\n+    it('should have static factory creation method', () => {\n+        assert.instanceOf(Tester.create(), Tester);\n+    });\n+\n+    describe('exec', () => {\n+        let options;\n+        let capture;\n+        let tester;\n+\n+        beforeEach(() => {\n+            sandbox.stub(temp, 'path').returns('tmp/path');\n+            sandbox.stub(Image, 'compare').returns(true);\n+            sandbox.stub(fs, 'exists').returns(q(true));\n+\n+            capture = {\n+                canHaveCaret: true,\n+                image: {\n+                    save: sandbox.stub().returns(q())\n+                }\n+            };\n+\n+            options = {\n+                refPath: 'some/ref/path',\n+                pixelRatio: 99,\n+                tolerance: 23\n+            };\n+\n+            tester = Tester.create('#diff');\n+        });\n+\n+        it('should save image into temporary folder', () => {\n+            return tester.exec(capture, options).then(() => {\n+                assert.calledWith(capture.image.save, 'tmp/path');\n+            });\n+        });\n+\n+        it('should reject with error if image was not saved properly', () => {\n+            fs.exists.returns(q(false));\n+            return assert.isRejected(tester.exec(capture, options), NoRefImageError);\n+        });\n+\n+        it('should compare images with given set of parameters', () => {\n+            return tester.exec(capture, options).then(() => {\n+                assert.calledWith(Image.compare, 'tmp/path', 'some/ref/path', {\n+                    canHaveCaret: true,","path":"test/unit/state-processor/capture-processor/tester.js","position":59,"original_position":59,"commit_id":"e3669cff27b7beb8938633feb28bcc4070499f8e","original_commit_id":"e3669cff27b7beb8938633feb28bcc4070499f8e","user":{"login":"sipayRT","id":1658415,"avatar_url":"https://avatars.githubusercontent.com/u/1658415?v=3","gravatar_id":"","url":"https://api.github.com/users/sipayRT","html_url":"https://github.com/sipayRT","followers_url":"https://api.github.com/users/sipayRT/followers","following_url":"https://api.github.com/users/sipayRT/following{/other_user}","gists_url":"https://api.github.com/users/sipayRT/gists{/gist_id}","starred_url":"https://api.github.com/users/sipayRT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipayRT/subscriptions","organizations_url":"https://api.github.com/users/sipayRT/orgs","repos_url":"https://api.github.com/users/sipayRT/repos","events_url":"https://api.github.com/users/sipayRT/events{/privacy}","received_events_url":"https://api.github.com/users/sipayRT/received_events","type":"User","site_admin":false},"body":"давай эти опции прокидывать явно в каждом тесте, а то мне как минимум один раз пришлось скролить выше, чтобы посмотреть с какими опциями запускается тестер.\r\n","created_at":"2016-07-15T14:31:45Z","updated_at":"2016-07-15T14:31:46Z","html_url":"https://github.com/gemini-testing/gemini/pull/516#discussion_r70982433","pull_request_url":"https://api.github.com/repos/gemini-testing/gemini/pulls/516","_links":{"self":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/comments/70982433"},"html":{"href":"https://github.com/gemini-testing/gemini/pull/516#discussion_r70982433"},"pull_request":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/516"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-testing/gemini/pulls/516","id":77473700,"html_url":"https://github.com/gemini-testing/gemini/pull/516","diff_url":"https://github.com/gemini-testing/gemini/pull/516.diff","patch_url":"https://github.com/gemini-testing/gemini/pull/516.patch","issue_url":"https://api.github.com/repos/gemini-testing/gemini/issues/516","number":516,"state":"open","locked":false,"title":"Pass pixel ratio parameter into looks-same module","user":{"login":"tormozz48","id":996162,"avatar_url":"https://avatars.githubusercontent.com/u/996162?v=3","gravatar_id":"","url":"https://api.github.com/users/tormozz48","html_url":"https://github.com/tormozz48","followers_url":"https://api.github.com/users/tormozz48/followers","following_url":"https://api.github.com/users/tormozz48/following{/other_user}","gists_url":"https://api.github.com/users/tormozz48/gists{/gist_id}","starred_url":"https://api.github.com/users/tormozz48/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tormozz48/subscriptions","organizations_url":"https://api.github.com/users/tormozz48/orgs","repos_url":"https://api.github.com/users/tormozz48/repos","events_url":"https://api.github.com/users/tormozz48/events{/privacy}","received_events_url":"https://api.github.com/users/tormozz48/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-14T15:15:14Z","updated_at":"2016-07-15T14:31:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a30b00cc98c82a54b8815920c5359210de974001","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gemini-testing/gemini/pulls/516/commits","review_comments_url":"https://api.github.com/repos/gemini-testing/gemini/pulls/516/comments","review_comment_url":"https://api.github.com/repos/gemini-testing/gemini/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-testing/gemini/issues/516/comments","statuses_url":"https://api.github.com/repos/gemini-testing/gemini/statuses/e3669cff27b7beb8938633feb28bcc4070499f8e","head":{"label":"gemini-testing:pass-pixel-ratio-to-looks-same","ref":"pass-pixel-ratio-to-looks-same","sha":"e3669cff27b7beb8938633feb28bcc4070499f8e","user":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"repo":{"id":16734168,"name":"gemini","full_name":"gemini-testing/gemini","owner":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-testing/gemini","description":"Utility for regression testing of web pages using screenshots","fork":false,"url":"https://api.github.com/repos/gemini-testing/gemini","forks_url":"https://api.github.com/repos/gemini-testing/gemini/forks","keys_url":"https://api.github.com/repos/gemini-testing/gemini/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/gemini/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/gemini/teams","hooks_url":"https://api.github.com/repos/gemini-testing/gemini/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/gemini/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/gemini/events","assignees_url":"https://api.github.com/repos/gemini-testing/gemini/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/gemini/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/gemini/tags","blobs_url":"https://api.github.com/repos/gemini-testing/gemini/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/gemini/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/gemini/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/gemini/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/gemini/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/gemini/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/gemini/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/gemini/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/gemini/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/gemini/subscription","commits_url":"https://api.github.com/repos/gemini-testing/gemini/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/gemini/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/gemini/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/gemini/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/gemini/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/gemini/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/gemini/merges","archive_url":"https://api.github.com/repos/gemini-testing/gemini/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/gemini/downloads","issues_url":"https://api.github.com/repos/gemini-testing/gemini/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/gemini/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/gemini/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/gemini/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/gemini/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/gemini/releases{/id}","deployments_url":"https://api.github.com/repos/gemini-testing/gemini/deployments","created_at":"2014-02-11T14:58:41Z","updated_at":"2016-07-14T18:20:46Z","pushed_at":"2016-07-15T10:43:30Z","git_url":"git://github.com/gemini-testing/gemini.git","ssh_url":"git@github.com:gemini-testing/gemini.git","clone_url":"https://github.com/gemini-testing/gemini.git","svn_url":"https://github.com/gemini-testing/gemini","homepage":"http://gemini-testing.github.io/gemini/","size":1880,"stargazers_count":610,"watchers_count":610,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":71,"mirror_url":null,"open_issues_count":65,"forks":71,"open_issues":65,"watchers":610,"default_branch":"master"}},"base":{"label":"gemini-testing:master","ref":"master","sha":"242cd9d11ea4dc2ef28771db6c60a3a6f61a24d3","user":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"repo":{"id":16734168,"name":"gemini","full_name":"gemini-testing/gemini","owner":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-testing/gemini","description":"Utility for regression testing of web pages using screenshots","fork":false,"url":"https://api.github.com/repos/gemini-testing/gemini","forks_url":"https://api.github.com/repos/gemini-testing/gemini/forks","keys_url":"https://api.github.com/repos/gemini-testing/gemini/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/gemini/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/gemini/teams","hooks_url":"https://api.github.com/repos/gemini-testing/gemini/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/gemini/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/gemini/events","assignees_url":"https://api.github.com/repos/gemini-testing/gemini/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/gemini/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/gemini/tags","blobs_url":"https://api.github.com/repos/gemini-testing/gemini/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/gemini/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/gemini/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/gemini/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/gemini/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/gemini/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/gemini/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/gemini/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/gemini/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/gemini/subscription","commits_url":"https://api.github.com/repos/gemini-testing/gemini/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/gemini/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/gemini/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/gemini/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/gemini/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/gemini/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/gemini/merges","archive_url":"https://api.github.com/repos/gemini-testing/gemini/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/gemini/downloads","issues_url":"https://api.github.com/repos/gemini-testing/gemini/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/gemini/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/gemini/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/gemini/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/gemini/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/gemini/releases{/id}","deployments_url":"https://api.github.com/repos/gemini-testing/gemini/deployments","created_at":"2014-02-11T14:58:41Z","updated_at":"2016-07-14T18:20:46Z","pushed_at":"2016-07-15T10:43:30Z","git_url":"git://github.com/gemini-testing/gemini.git","ssh_url":"git@github.com:gemini-testing/gemini.git","clone_url":"https://github.com/gemini-testing/gemini.git","svn_url":"https://github.com/gemini-testing/gemini","homepage":"http://gemini-testing.github.io/gemini/","size":1880,"stargazers_count":610,"watchers_count":610,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":71,"mirror_url":null,"open_issues_count":65,"forks":71,"open_issues":65,"watchers":610,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/516"},"html":{"href":"https://github.com/gemini-testing/gemini/pull/516"},"issue":{"href":"https://api.github.com/repos/gemini-testing/gemini/issues/516"},"comments":{"href":"https://api.github.com/repos/gemini-testing/gemini/issues/516/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/516/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-testing/gemini/pulls/516/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-testing/gemini/statuses/e3669cff27b7beb8938633feb28bcc4070499f8e"}}}}
{"actor":{"display_login":"sipayRT"}}