{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/comments/90047662","pull_request_review_id":10537795,"id":90047662,"diff_hunk":"@@ -0,0 +1,129 @@\n+'use strict';\n+\n+const fs = require('fs');\n+const proxyquire = require('proxyquire');\n+const TestSet = require('../../lib/test-reader/test-set');\n+\n+describe('TestSet', () => {\n+    const sandbox = sinon.sandbox.create();\n+\n+    let set;\n+\n+    beforeEach(() => {\n+        set = TestSet.create({\n+            files: ['some/path/file.js'],\n+            browsers: ['bro1', 'bro2']\n+        });\n+    });\n+\n+    afterEach(() => sandbox.restore());\n+\n+    it('should return all set files', () => {\n+        const files = set.getFiles();\n+\n+        assert.deepEqual(files, ['some/path/file.js']);\n+    });\n+\n+    it('should return all set browsers', () => {\n+        const browsers = set.getBrowsers();\n+\n+        assert.deepEqual(browsers, ['bro1', 'bro2']);\n+    });\n+\n+    describe('getBrowsersForFile', () => {\n+        it('should return all browsers for file', () => {\n+            const browsers = set.getBrowsersForFile('some/path/file.js');\n+\n+            assert.deepEqual(browsers, ['bro1', 'bro2']);\n+        });\n+\n+        it('should return empty array if no such file in the set', () => {\n+            const browsers = set.getBrowsersForFile('other/path/file1.js');\n+\n+            assert.deepEqual(browsers, []);\n+        });\n+    });\n+\n+    describe('getFilesForBrowser', () => {\n+        it('should return all files for browser', () => {\n+            const files = set.getFilesForBrowser('bro1');\n+\n+            assert.deepEqual(files, ['some/path/file.js']);\n+        });\n+\n+        it('should return empty array if no such browser in the set', () => {\n+            const files = set.getFilesForBrowser('bro3');\n+\n+            assert.deepEqual(files, []);\n+        });\n+    });\n+\n+    describe('useFiles', () => {\n+        it('should return set files and passed files intersection', () =>{\n+            set.useFiles(['some/path/file.js', 'some/path/file2.js']);\n+\n+            const files = set.getFiles();\n+\n+            assert.deepEqual(files, ['some/path/file.js']);\n+        });\n+\n+        it('should return passed files if set files are empty', () => {\n+            set = TestSet.create({files: []});\n+            set.useFiles(['some/path/file.js']);\n+\n+            const files = set.getFiles();\n+\n+            assert.deepEqual(files, ['some/path/file.js']);\n+        });\n+\n+        describe('all files in set are specified as masks', () => {\n+            it('should call micromatch to match passed files with set of files masks', () => {\n+                const mmStub = sandbox.stub();\n+                const TestSet = proxyquire('../../lib/test-reader/test-set', {\n+                    micromatch: mmStub","path":"test/test-reader/test-set.js","position":83,"original_position":83,"commit_id":"8aceac20f19528020c4d8e363f01bcf835c3436b","original_commit_id":"8aceac20f19528020c4d8e363f01bcf835c3436b","user":{"login":"eGavr","id":6376693,"avatar_url":"https://avatars.githubusercontent.com/u/6376693?v=3","gravatar_id":"","url":"https://api.github.com/users/eGavr","html_url":"https://github.com/eGavr","followers_url":"https://api.github.com/users/eGavr/followers","following_url":"https://api.github.com/users/eGavr/following{/other_user}","gists_url":"https://api.github.com/users/eGavr/gists{/gist_id}","starred_url":"https://api.github.com/users/eGavr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eGavr/subscriptions","organizations_url":"https://api.github.com/users/eGavr/orgs","repos_url":"https://api.github.com/users/eGavr/repos","events_url":"https://api.github.com/users/eGavr/events{/privacy}","received_events_url":"https://api.github.com/users/eGavr/received_events","type":"User","site_admin":false},"body":"перебор со стабом микроматча) не надо его стабать, пусть реально зовется тесте.\r\n\r\nну это все равно, что стабать какие-то нативные нодовые модули типа `path`.","created_at":"2016-11-29T16:33:23Z","updated_at":"2016-11-29T16:36:15Z","html_url":"https://github.com/gemini-testing/gemini-core/pull/1#discussion_r90047662","pull_request_url":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/comments/90047662"},"html":{"href":"https://github.com/gemini-testing/gemini-core/pull/1#discussion_r90047662"},"pull_request":{"href":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/1","id":91201783,"html_url":"https://github.com/gemini-testing/gemini-core/pull/1","diff_url":"https://github.com/gemini-testing/gemini-core/pull/1.diff","patch_url":"https://github.com/gemini-testing/gemini-core/pull/1.patch","issue_url":"https://api.github.com/repos/gemini-testing/gemini-core/issues/1","number":1,"state":"open","locked":false,"title":"add test-reader","user":{"login":"rostik404","id":8089139,"avatar_url":"https://avatars.githubusercontent.com/u/8089139?v=3","gravatar_id":"","url":"https://api.github.com/users/rostik404","html_url":"https://github.com/rostik404","followers_url":"https://api.github.com/users/rostik404/followers","following_url":"https://api.github.com/users/rostik404/following{/other_user}","gists_url":"https://api.github.com/users/rostik404/gists{/gist_id}","starred_url":"https://api.github.com/users/rostik404/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rostik404/subscriptions","organizations_url":"https://api.github.com/users/rostik404/orgs","repos_url":"https://api.github.com/users/rostik404/repos","events_url":"https://api.github.com/users/rostik404/events{/privacy}","received_events_url":"https://api.github.com/users/rostik404/received_events","type":"User","site_admin":false},"body":"/cc @j0tunn, @sipayRT, @eGavr, @tormozz48, @DudaGod\r\n\r\nТут большая часть - копипаста, гляньте по диагонали, пожалуйста.\r\n\r\n**UPD** Уже не копипаста","created_at":"2016-10-27T13:34:33Z","updated_at":"2016-11-29T16:36:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6dd1ff7b5e7ec804ba53fd97bfb77ee96a6b5ec8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/1/commits","review_comments_url":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/1/comments","review_comment_url":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-testing/gemini-core/issues/1/comments","statuses_url":"https://api.github.com/repos/gemini-testing/gemini-core/statuses/8aceac20f19528020c4d8e363f01bcf835c3436b","head":{"label":"gemini-testing:add-test-reader","ref":"add-test-reader","sha":"8aceac20f19528020c4d8e363f01bcf835c3436b","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":71901887,"name":"gemini-core","full_name":"gemini-testing/gemini-core","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-core","description":"Utility which contains common modules for gemini and hermione.","fork":false,"url":"https://api.github.com/repos/gemini-testing/gemini-core","forks_url":"https://api.github.com/repos/gemini-testing/gemini-core/forks","keys_url":"https://api.github.com/repos/gemini-testing/gemini-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/gemini-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/gemini-core/teams","hooks_url":"https://api.github.com/repos/gemini-testing/gemini-core/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/gemini-core/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/gemini-core/events","assignees_url":"https://api.github.com/repos/gemini-testing/gemini-core/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/gemini-core/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/gemini-core/tags","blobs_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/gemini-core/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/gemini-core/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/gemini-core/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/gemini-core/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/gemini-core/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/gemini-core/subscription","commits_url":"https://api.github.com/repos/gemini-testing/gemini-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/gemini-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/gemini-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/gemini-core/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/gemini-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/gemini-core/merges","archive_url":"https://api.github.com/repos/gemini-testing/gemini-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/gemini-core/downloads","issues_url":"https://api.github.com/repos/gemini-testing/gemini-core/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/gemini-core/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/gemini-core/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/gemini-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/gemini-core/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/gemini-core/releases{/id}","deployments_url":"https://api.github.com/repos/gemini-testing/gemini-core/deployments","created_at":"2016-10-25T13:52:10Z","updated_at":"2016-11-21T10:18:53Z","pushed_at":"2016-11-28T20:41:51Z","git_url":"git://github.com/gemini-testing/gemini-core.git","ssh_url":"git@github.com:gemini-testing/gemini-core.git","clone_url":"https://github.com/gemini-testing/gemini-core.git","svn_url":"https://github.com/gemini-testing/gemini-core","homepage":"","size":30,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"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":"gemini-testing:master","ref":"master","sha":"3b35e879a4bf986310e77b5cdfbe314e160e71b3","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":71901887,"name":"gemini-core","full_name":"gemini-testing/gemini-core","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-core","description":"Utility which contains common modules for gemini and hermione.","fork":false,"url":"https://api.github.com/repos/gemini-testing/gemini-core","forks_url":"https://api.github.com/repos/gemini-testing/gemini-core/forks","keys_url":"https://api.github.com/repos/gemini-testing/gemini-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/gemini-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/gemini-core/teams","hooks_url":"https://api.github.com/repos/gemini-testing/gemini-core/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/gemini-core/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/gemini-core/events","assignees_url":"https://api.github.com/repos/gemini-testing/gemini-core/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/gemini-core/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/gemini-core/tags","blobs_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/gemini-core/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/gemini-core/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/gemini-core/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/gemini-core/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/gemini-core/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/gemini-core/subscription","commits_url":"https://api.github.com/repos/gemini-testing/gemini-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/gemini-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/gemini-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/gemini-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/gemini-core/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/gemini-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/gemini-core/merges","archive_url":"https://api.github.com/repos/gemini-testing/gemini-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/gemini-core/downloads","issues_url":"https://api.github.com/repos/gemini-testing/gemini-core/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/gemini-core/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/gemini-core/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/gemini-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/gemini-core/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/gemini-core/releases{/id}","deployments_url":"https://api.github.com/repos/gemini-testing/gemini-core/deployments","created_at":"2016-10-25T13:52:10Z","updated_at":"2016-11-21T10:18:53Z","pushed_at":"2016-11-28T20:41:51Z","git_url":"git://github.com/gemini-testing/gemini-core.git","ssh_url":"git@github.com:gemini-testing/gemini-core.git","clone_url":"https://github.com/gemini-testing/gemini-core.git","svn_url":"https://github.com/gemini-testing/gemini-core","homepage":"","size":30,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"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/gemini-testing/gemini-core/pulls/1"},"html":{"href":"https://github.com/gemini-testing/gemini-core/pull/1"},"issue":{"href":"https://api.github.com/repos/gemini-testing/gemini-core/issues/1"},"comments":{"href":"https://api.github.com/repos/gemini-testing/gemini-core/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-testing/gemini-core/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-testing/gemini-core/statuses/8aceac20f19528020c4d8e363f01bcf835c3436b"}}}}
{"actor":{"display_login":"eGavr"}}