{"action":"created","comment":{"url":"https://api.github.com/repos/DevExpress/testcafe/pulls/comments/44772816","id":44772816,"diff_hunk":"@@ -0,0 +1,335 @@\n+var util     = require('util'),\n+    ErrCodes = require('./err_codes');\n+\n+module.exports = function (err) {\n+    var msg = 'UNKNOWN_ERROR',\n+        m   = function () {\n+            msg = util.format.apply(this, arguments);\n+        };\n+\n+    switch (err.type) {\n+        //Fixture file\n+        case ErrCodes.FIXTURE_DIRECTIVE_REDEFINITION:\n+            m(\n+                '(line %s): @fixture directive redefinition. @fixture directive should be used once per test fixture file.',\n+                err.line\n+            );\n+            break;\n+\n+        case ErrCodes.PAGE_DIRECTIVE_REDEFINITION:\n+            m(\n+                '(line %s): @page directive redefinition. @page directive should be used once per test fixture file.',\n+                err.line\n+            );\n+            break;\n+\n+        case ErrCodes.INVALID_NETWORK_AUTHENTICATION_CREDENTIALS_FORMAT:\n+            m('(line %s): network authentication credentials have incorrect format. @auth directive should use the ' +\n+              'following format: \"@auth username:password\".',\n+                err.line);\n+            break;\n+\n+        case ErrCodes.REQUIRED_FILE_ALREADY_INCLUDED:\n+            m(\n+                '(line %s): Required file \"%s\" is already included.',\n+                err.line,\n+                err.req\n+            );\n+            break;\n+\n+        case ErrCodes.MISPLACED_DIRECTIVE:\n+            m(\n+                '(line %s): Misplaced directive. Directives (@fixture, @page, etc.) should be declared ' +\n+                'on a global scope.',\n+                err.line\n+            );\n+            break;\n+\n+        case ErrCodes.MISPLACED_TEST_DECLARATION:\n+            m(\n+                '(line %s): Misplaced test directive. Tests should be declared on a global scope.',\n+                err.line\n+            );\n+            break;\n+\n+\n+        case ErrCodes.DUPLICATE_TEST_NAME:\n+            m(\n+                '(line %s): Test with name \"%s\" is already exists.',\n+                err.line,\n+                err.name\n+            );\n+            break;\n+\n+\n+        case ErrCodes.TEST_NAME_CHANGED_TO_ALREADY_USED:\n+            m(\n+                'Test with name \"%s\" is already exists.',","path":"src/compiler/legacy/get_err_msg.js","position":67,"original_position":67,"commit_id":"90d3ad030a5d692680df3dbfb8096f5af1b624aa","original_commit_id":"90d3ad030a5d692680df3dbfb8096f5af1b624aa","user":{"login":"VasilyStrelyaev","id":11459924,"avatar_url":"https://avatars.githubusercontent.com/u/11459924?v=3","gravatar_id":"","url":"https://api.github.com/users/VasilyStrelyaev","html_url":"https://github.com/VasilyStrelyaev","followers_url":"https://api.github.com/users/VasilyStrelyaev/followers","following_url":"https://api.github.com/users/VasilyStrelyaev/following{/other_user}","gists_url":"https://api.github.com/users/VasilyStrelyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/VasilyStrelyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VasilyStrelyaev/subscriptions","organizations_url":"https://api.github.com/users/VasilyStrelyaev/orgs","repos_url":"https://api.github.com/users/VasilyStrelyaev/repos","events_url":"https://api.github.com/users/VasilyStrelyaev/events{/privacy}","received_events_url":"https://api.github.com/users/VasilyStrelyaev/received_events","type":"User","site_admin":false},"body":"```\r\n                '(line %s): Test with name \"%s\" already exists.',\r\n```","created_at":"2015-11-13T11:22:17Z","updated_at":"2015-11-13T11:22:17Z","html_url":"https://github.com/DevExpress/testcafe/pull/182#discussion_r44772816","pull_request_url":"https://api.github.com/repos/DevExpress/testcafe/pulls/182","_links":{"self":{"href":"https://api.github.com/repos/DevExpress/testcafe/pulls/comments/44772816"},"html":{"href":"https://github.com/DevExpress/testcafe/pull/182#discussion_r44772816"},"pull_request":{"href":"https://api.github.com/repos/DevExpress/testcafe/pulls/182"}}},"pull_request":{"url":"https://api.github.com/repos/DevExpress/testcafe/pulls/182","id":50497229,"html_url":"https://github.com/DevExpress/testcafe/pull/182","diff_url":"https://github.com/DevExpress/testcafe/pull/182.diff","patch_url":"https://github.com/DevExpress/testcafe/pull/182.patch","issue_url":"https://api.github.com/repos/DevExpress/testcafe/issues/182","number":182,"state":"open","locked":false,"title":"Die gracefully on legacy compiler errors (fixes #166)","user":{"login":"inikulin","id":453071,"avatar_url":"https://avatars.githubusercontent.com/u/453071?v=3","gravatar_id":"","url":"https://api.github.com/users/inikulin","html_url":"https://github.com/inikulin","followers_url":"https://api.github.com/users/inikulin/followers","following_url":"https://api.github.com/users/inikulin/following{/other_user}","gists_url":"https://api.github.com/users/inikulin/gists{/gist_id}","starred_url":"https://api.github.com/users/inikulin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inikulin/subscriptions","organizations_url":"https://api.github.com/users/inikulin/orgs","repos_url":"https://api.github.com/users/inikulin/repos","events_url":"https://api.github.com/users/inikulin/events{/privacy}","received_events_url":"https://api.github.com/users/inikulin/received_events","type":"User","site_admin":false},"body":"\\сс @AlexanderMoskovkin @helen-dikareva ","created_at":"2015-11-12T10:59:53Z","updated_at":"2015-11-13T11:22:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"274059a8c8e5a4256bcde2239a0d65a1f5c488cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DevExpress/testcafe/pulls/182/commits","review_comments_url":"https://api.github.com/repos/DevExpress/testcafe/pulls/182/comments","review_comment_url":"https://api.github.com/repos/DevExpress/testcafe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DevExpress/testcafe/issues/182/comments","statuses_url":"https://api.github.com/repos/DevExpress/testcafe/statuses/90d3ad030a5d692680df3dbfb8096f5af1b624aa","head":{"label":"inikulin:gh166","ref":"gh166","sha":"90d3ad030a5d692680df3dbfb8096f5af1b624aa","user":{"login":"inikulin","id":453071,"avatar_url":"https://avatars.githubusercontent.com/u/453071?v=3","gravatar_id":"","url":"https://api.github.com/users/inikulin","html_url":"https://github.com/inikulin","followers_url":"https://api.github.com/users/inikulin/followers","following_url":"https://api.github.com/users/inikulin/following{/other_user}","gists_url":"https://api.github.com/users/inikulin/gists{/gist_id}","starred_url":"https://api.github.com/users/inikulin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inikulin/subscriptions","organizations_url":"https://api.github.com/users/inikulin/orgs","repos_url":"https://api.github.com/users/inikulin/repos","events_url":"https://api.github.com/users/inikulin/events{/privacy}","received_events_url":"https://api.github.com/users/inikulin/received_events","type":"User","site_admin":false},"repo":{"id":45903679,"name":"testcafe","full_name":"inikulin/testcafe","owner":{"login":"inikulin","id":453071,"avatar_url":"https://avatars.githubusercontent.com/u/453071?v=3","gravatar_id":"","url":"https://api.github.com/users/inikulin","html_url":"https://github.com/inikulin","followers_url":"https://api.github.com/users/inikulin/followers","following_url":"https://api.github.com/users/inikulin/following{/other_user}","gists_url":"https://api.github.com/users/inikulin/gists{/gist_id}","starred_url":"https://api.github.com/users/inikulin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inikulin/subscriptions","organizations_url":"https://api.github.com/users/inikulin/orgs","repos_url":"https://api.github.com/users/inikulin/repos","events_url":"https://api.github.com/users/inikulin/events{/privacy}","received_events_url":"https://api.github.com/users/inikulin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/inikulin/testcafe","description":"","fork":true,"url":"https://api.github.com/repos/inikulin/testcafe","forks_url":"https://api.github.com/repos/inikulin/testcafe/forks","keys_url":"https://api.github.com/repos/inikulin/testcafe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inikulin/testcafe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inikulin/testcafe/teams","hooks_url":"https://api.github.com/repos/inikulin/testcafe/hooks","issue_events_url":"https://api.github.com/repos/inikulin/testcafe/issues/events{/number}","events_url":"https://api.github.com/repos/inikulin/testcafe/events","assignees_url":"https://api.github.com/repos/inikulin/testcafe/assignees{/user}","branches_url":"https://api.github.com/repos/inikulin/testcafe/branches{/branch}","tags_url":"https://api.github.com/repos/inikulin/testcafe/tags","blobs_url":"https://api.github.com/repos/inikulin/testcafe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inikulin/testcafe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inikulin/testcafe/git/refs{/sha}","trees_url":"https://api.github.com/repos/inikulin/testcafe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inikulin/testcafe/statuses/{sha}","languages_url":"https://api.github.com/repos/inikulin/testcafe/languages","stargazers_url":"https://api.github.com/repos/inikulin/testcafe/stargazers","contributors_url":"https://api.github.com/repos/inikulin/testcafe/contributors","subscribers_url":"https://api.github.com/repos/inikulin/testcafe/subscribers","subscription_url":"https://api.github.com/repos/inikulin/testcafe/subscription","commits_url":"https://api.github.com/repos/inikulin/testcafe/commits{/sha}","git_commits_url":"https://api.github.com/repos/inikulin/testcafe/git/commits{/sha}","comments_url":"https://api.github.com/repos/inikulin/testcafe/comments{/number}","issue_comment_url":"https://api.github.com/repos/inikulin/testcafe/issues/comments{/number}","contents_url":"https://api.github.com/repos/inikulin/testcafe/contents/{+path}","compare_url":"https://api.github.com/repos/inikulin/testcafe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inikulin/testcafe/merges","archive_url":"https://api.github.com/repos/inikulin/testcafe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inikulin/testcafe/downloads","issues_url":"https://api.github.com/repos/inikulin/testcafe/issues{/number}","pulls_url":"https://api.github.com/repos/inikulin/testcafe/pulls{/number}","milestones_url":"https://api.github.com/repos/inikulin/testcafe/milestones{/number}","notifications_url":"https://api.github.com/repos/inikulin/testcafe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inikulin/testcafe/labels{/name}","releases_url":"https://api.github.com/repos/inikulin/testcafe/releases{/id}","created_at":"2015-11-10T10:07:35Z","updated_at":"2015-11-10T10:07:37Z","pushed_at":"2015-11-12T15:41:14Z","git_url":"git://github.com/inikulin/testcafe.git","ssh_url":"git@github.com:inikulin/testcafe.git","clone_url":"https://github.com/inikulin/testcafe.git","svn_url":"https://github.com/inikulin/testcafe","homepage":null,"size":24137,"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":"DevExpress:master","ref":"master","sha":"36ead6b39a7dcc7a3ffb10b9c208c3b718bafcb5","user":{"login":"DevExpress","id":4243232,"avatar_url":"https://avatars.githubusercontent.com/u/4243232?v=3","gravatar_id":"","url":"https://api.github.com/users/DevExpress","html_url":"https://github.com/DevExpress","followers_url":"https://api.github.com/users/DevExpress/followers","following_url":"https://api.github.com/users/DevExpress/following{/other_user}","gists_url":"https://api.github.com/users/DevExpress/gists{/gist_id}","starred_url":"https://api.github.com/users/DevExpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevExpress/subscriptions","organizations_url":"https://api.github.com/users/DevExpress/orgs","repos_url":"https://api.github.com/users/DevExpress/repos","events_url":"https://api.github.com/users/DevExpress/events{/privacy}","received_events_url":"https://api.github.com/users/DevExpress/received_events","type":"Organization","site_admin":false},"repo":{"id":34262857,"name":"testcafe","full_name":"DevExpress/testcafe","owner":{"login":"DevExpress","id":4243232,"avatar_url":"https://avatars.githubusercontent.com/u/4243232?v=3","gravatar_id":"","url":"https://api.github.com/users/DevExpress","html_url":"https://github.com/DevExpress","followers_url":"https://api.github.com/users/DevExpress/followers","following_url":"https://api.github.com/users/DevExpress/following{/other_user}","gists_url":"https://api.github.com/users/DevExpress/gists{/gist_id}","starred_url":"https://api.github.com/users/DevExpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevExpress/subscriptions","organizations_url":"https://api.github.com/users/DevExpress/orgs","repos_url":"https://api.github.com/users/DevExpress/repos","events_url":"https://api.github.com/users/DevExpress/events{/privacy}","received_events_url":"https://api.github.com/users/DevExpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DevExpress/testcafe","description":"","fork":false,"url":"https://api.github.com/repos/DevExpress/testcafe","forks_url":"https://api.github.com/repos/DevExpress/testcafe/forks","keys_url":"https://api.github.com/repos/DevExpress/testcafe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DevExpress/testcafe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DevExpress/testcafe/teams","hooks_url":"https://api.github.com/repos/DevExpress/testcafe/hooks","issue_events_url":"https://api.github.com/repos/DevExpress/testcafe/issues/events{/number}","events_url":"https://api.github.com/repos/DevExpress/testcafe/events","assignees_url":"https://api.github.com/repos/DevExpress/testcafe/assignees{/user}","branches_url":"https://api.github.com/repos/DevExpress/testcafe/branches{/branch}","tags_url":"https://api.github.com/repos/DevExpress/testcafe/tags","blobs_url":"https://api.github.com/repos/DevExpress/testcafe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DevExpress/testcafe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DevExpress/testcafe/git/refs{/sha}","trees_url":"https://api.github.com/repos/DevExpress/testcafe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DevExpress/testcafe/statuses/{sha}","languages_url":"https://api.github.com/repos/DevExpress/testcafe/languages","stargazers_url":"https://api.github.com/repos/DevExpress/testcafe/stargazers","contributors_url":"https://api.github.com/repos/DevExpress/testcafe/contributors","subscribers_url":"https://api.github.com/repos/DevExpress/testcafe/subscribers","subscription_url":"https://api.github.com/repos/DevExpress/testcafe/subscription","commits_url":"https://api.github.com/repos/DevExpress/testcafe/commits{/sha}","git_commits_url":"https://api.github.com/repos/DevExpress/testcafe/git/commits{/sha}","comments_url":"https://api.github.com/repos/DevExpress/testcafe/comments{/number}","issue_comment_url":"https://api.github.com/repos/DevExpress/testcafe/issues/comments{/number}","contents_url":"https://api.github.com/repos/DevExpress/testcafe/contents/{+path}","compare_url":"https://api.github.com/repos/DevExpress/testcafe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DevExpress/testcafe/merges","archive_url":"https://api.github.com/repos/DevExpress/testcafe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DevExpress/testcafe/downloads","issues_url":"https://api.github.com/repos/DevExpress/testcafe/issues{/number}","pulls_url":"https://api.github.com/repos/DevExpress/testcafe/pulls{/number}","milestones_url":"https://api.github.com/repos/DevExpress/testcafe/milestones{/number}","notifications_url":"https://api.github.com/repos/DevExpress/testcafe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DevExpress/testcafe/labels{/name}","releases_url":"https://api.github.com/repos/DevExpress/testcafe/releases{/id}","created_at":"2015-04-20T13:43:28Z","updated_at":"2015-11-09T11:58:28Z","pushed_at":"2015-11-13T11:09:01Z","git_url":"git://github.com/DevExpress/testcafe.git","ssh_url":"git@github.com:DevExpress/testcafe.git","clone_url":"https://github.com/DevExpress/testcafe.git","svn_url":"https://github.com/DevExpress/testcafe","homepage":null,"size":25011,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":36,"forks":10,"open_issues":36,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DevExpress/testcafe/pulls/182"},"html":{"href":"https://github.com/DevExpress/testcafe/pull/182"},"issue":{"href":"https://api.github.com/repos/DevExpress/testcafe/issues/182"},"comments":{"href":"https://api.github.com/repos/DevExpress/testcafe/issues/182/comments"},"review_comments":{"href":"https://api.github.com/repos/DevExpress/testcafe/pulls/182/comments"},"review_comment":{"href":"https://api.github.com/repos/DevExpress/testcafe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DevExpress/testcafe/pulls/182/commits"},"statuses":{"href":"https://api.github.com/repos/DevExpress/testcafe/statuses/90d3ad030a5d692680df3dbfb8096f5af1b624aa"}}}}