{"action":"created","comment":{"url":"https://api.github.com/repos/endrawes0/Chesster/pulls/comments/83543146","pull_request_review_id":4382154,"id":83543146,"diff_hunk":"@@ -0,0 +1,111 @@\n+var assert = require('chai').assert;\n+var commands = require('../src/commands');\n+\n+describe('commands', function(){\n+    describe('#tokenize()', function(){\n+        function assertIfCalled(message){\n+            return function(){ assert(false, message); };\n+        }\n+        it(\"tokenize a constant string as an object containing parameters for each constant, of the same name and with the constant as the value\", function(){\n+           return commands.tokenize('this is a test string of constants', [\n+               'this', 'is', 'a', 'test', 'string', 'of', 'constants'\n+           ]).then(function(parameters){\n+               assert.deepEqual(parameters, {\n+                   'this':'this',\n+                   'is':'is',\n+                   'a':'a',\n+                   'test':'test',\n+                   'string':'string',\n+                   'of':'of',\n+                   'constants':'constants'\n+               });\n+           });\n+        });\n+        it(\"tokenize a command with all tokenDescriptors\", function(){\n+            return commands.tokenize('constant 4 text option1', [\n+                'constant', \n+                '{int:intVar}',\n+                '{text:textVar}',\n+                '{option1|option2}'\n+            ]).then(function(parameters){\n+                assert.deepEqual(parameters, {\n+                    'constant': 'constant',\n+                    'intVar': 4,\n+                    'textVar': 'text',\n+                    'option1': 'option1',\n+                });\n+            });\n+        });\n+        it(\"throw an InvalidConstantError if the token does not exactly match the specified constant\", \n+            function(){\n+                return commands.tokenize('this', ['that']).then(assertIfCalled('tokenize did not throw'))","path":"test/test_commands.js","position":41,"original_position":41,"commit_id":"915e994b68e5a509dd3049a02d7a1e52adee609b","original_commit_id":"915e994b68e5a509dd3049a02d7a1e52adee609b","user":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"body":"Yea - I was being lazy - \r\n\r\nThanks for keeping me honest.","created_at":"2016-10-16T01:21:47Z","updated_at":"2016-10-16T01:21:47Z","html_url":"https://github.com/endrawes0/Chesster/pull/175#discussion_r83543146","pull_request_url":"https://api.github.com/repos/endrawes0/Chesster/pulls/175","_links":{"self":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/comments/83543146"},"html":{"href":"https://github.com/endrawes0/Chesster/pull/175#discussion_r83543146"},"pull_request":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/endrawes0/Chesster/pulls/175","id":89512132,"html_url":"https://github.com/endrawes0/Chesster/pull/175","diff_url":"https://github.com/endrawes0/Chesster/pull/175.diff","patch_url":"https://github.com/endrawes0/Chesster/pull/175.patch","issue_url":"https://api.github.com/repos/endrawes0/Chesster/issues/175","number":175,"state":"open","locked":false,"title":"Commandsjs unit tests","user":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"body":"Finally finished these tests.","created_at":"2016-10-16T01:09:52Z","updated_at":"2016-10-16T01:21:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dad3af7227bfb535ad41f7ee791848bb5d274f14","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/endrawes0/Chesster/pulls/175/commits","review_comments_url":"https://api.github.com/repos/endrawes0/Chesster/pulls/175/comments","review_comment_url":"https://api.github.com/repos/endrawes0/Chesster/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endrawes0/Chesster/issues/175/comments","statuses_url":"https://api.github.com/repos/endrawes0/Chesster/statuses/915e994b68e5a509dd3049a02d7a1e52adee609b","head":{"label":"endrawes0:commands_tests","ref":"commands_tests","sha":"915e994b68e5a509dd3049a02d7a1e52adee609b","user":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"repo":{"id":54806632,"name":"Chesster","full_name":"endrawes0/Chesster","owner":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/endrawes0/Chesster","description":"Chesster Moderator Bot for Lichess45+45","fork":false,"url":"https://api.github.com/repos/endrawes0/Chesster","forks_url":"https://api.github.com/repos/endrawes0/Chesster/forks","keys_url":"https://api.github.com/repos/endrawes0/Chesster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endrawes0/Chesster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endrawes0/Chesster/teams","hooks_url":"https://api.github.com/repos/endrawes0/Chesster/hooks","issue_events_url":"https://api.github.com/repos/endrawes0/Chesster/issues/events{/number}","events_url":"https://api.github.com/repos/endrawes0/Chesster/events","assignees_url":"https://api.github.com/repos/endrawes0/Chesster/assignees{/user}","branches_url":"https://api.github.com/repos/endrawes0/Chesster/branches{/branch}","tags_url":"https://api.github.com/repos/endrawes0/Chesster/tags","blobs_url":"https://api.github.com/repos/endrawes0/Chesster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endrawes0/Chesster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endrawes0/Chesster/git/refs{/sha}","trees_url":"https://api.github.com/repos/endrawes0/Chesster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endrawes0/Chesster/statuses/{sha}","languages_url":"https://api.github.com/repos/endrawes0/Chesster/languages","stargazers_url":"https://api.github.com/repos/endrawes0/Chesster/stargazers","contributors_url":"https://api.github.com/repos/endrawes0/Chesster/contributors","subscribers_url":"https://api.github.com/repos/endrawes0/Chesster/subscribers","subscription_url":"https://api.github.com/repos/endrawes0/Chesster/subscription","commits_url":"https://api.github.com/repos/endrawes0/Chesster/commits{/sha}","git_commits_url":"https://api.github.com/repos/endrawes0/Chesster/git/commits{/sha}","comments_url":"https://api.github.com/repos/endrawes0/Chesster/comments{/number}","issue_comment_url":"https://api.github.com/repos/endrawes0/Chesster/issues/comments{/number}","contents_url":"https://api.github.com/repos/endrawes0/Chesster/contents/{+path}","compare_url":"https://api.github.com/repos/endrawes0/Chesster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endrawes0/Chesster/merges","archive_url":"https://api.github.com/repos/endrawes0/Chesster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endrawes0/Chesster/downloads","issues_url":"https://api.github.com/repos/endrawes0/Chesster/issues{/number}","pulls_url":"https://api.github.com/repos/endrawes0/Chesster/pulls{/number}","milestones_url":"https://api.github.com/repos/endrawes0/Chesster/milestones{/number}","notifications_url":"https://api.github.com/repos/endrawes0/Chesster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endrawes0/Chesster/labels{/name}","releases_url":"https://api.github.com/repos/endrawes0/Chesster/releases{/id}","deployments_url":"https://api.github.com/repos/endrawes0/Chesster/deployments","created_at":"2016-03-27T01:06:03Z","updated_at":"2016-10-02T23:41:53Z","pushed_at":"2016-10-16T01:09:52Z","git_url":"git://github.com/endrawes0/Chesster.git","ssh_url":"git@github.com:endrawes0/Chesster.git","clone_url":"https://github.com/endrawes0/Chesster.git","svn_url":"https://github.com/endrawes0/Chesster","homepage":null,"size":532,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":26,"forks":6,"open_issues":26,"watchers":9,"default_branch":"master"}},"base":{"label":"endrawes0:master","ref":"master","sha":"7146233c6a08f3c60f2c2f0b71c54f0b4e2f7f1c","user":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"repo":{"id":54806632,"name":"Chesster","full_name":"endrawes0/Chesster","owner":{"login":"endrawes0","id":14969307,"avatar_url":"https://avatars.githubusercontent.com/u/14969307?v=3","gravatar_id":"","url":"https://api.github.com/users/endrawes0","html_url":"https://github.com/endrawes0","followers_url":"https://api.github.com/users/endrawes0/followers","following_url":"https://api.github.com/users/endrawes0/following{/other_user}","gists_url":"https://api.github.com/users/endrawes0/gists{/gist_id}","starred_url":"https://api.github.com/users/endrawes0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrawes0/subscriptions","organizations_url":"https://api.github.com/users/endrawes0/orgs","repos_url":"https://api.github.com/users/endrawes0/repos","events_url":"https://api.github.com/users/endrawes0/events{/privacy}","received_events_url":"https://api.github.com/users/endrawes0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/endrawes0/Chesster","description":"Chesster Moderator Bot for Lichess45+45","fork":false,"url":"https://api.github.com/repos/endrawes0/Chesster","forks_url":"https://api.github.com/repos/endrawes0/Chesster/forks","keys_url":"https://api.github.com/repos/endrawes0/Chesster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endrawes0/Chesster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endrawes0/Chesster/teams","hooks_url":"https://api.github.com/repos/endrawes0/Chesster/hooks","issue_events_url":"https://api.github.com/repos/endrawes0/Chesster/issues/events{/number}","events_url":"https://api.github.com/repos/endrawes0/Chesster/events","assignees_url":"https://api.github.com/repos/endrawes0/Chesster/assignees{/user}","branches_url":"https://api.github.com/repos/endrawes0/Chesster/branches{/branch}","tags_url":"https://api.github.com/repos/endrawes0/Chesster/tags","blobs_url":"https://api.github.com/repos/endrawes0/Chesster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endrawes0/Chesster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endrawes0/Chesster/git/refs{/sha}","trees_url":"https://api.github.com/repos/endrawes0/Chesster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endrawes0/Chesster/statuses/{sha}","languages_url":"https://api.github.com/repos/endrawes0/Chesster/languages","stargazers_url":"https://api.github.com/repos/endrawes0/Chesster/stargazers","contributors_url":"https://api.github.com/repos/endrawes0/Chesster/contributors","subscribers_url":"https://api.github.com/repos/endrawes0/Chesster/subscribers","subscription_url":"https://api.github.com/repos/endrawes0/Chesster/subscription","commits_url":"https://api.github.com/repos/endrawes0/Chesster/commits{/sha}","git_commits_url":"https://api.github.com/repos/endrawes0/Chesster/git/commits{/sha}","comments_url":"https://api.github.com/repos/endrawes0/Chesster/comments{/number}","issue_comment_url":"https://api.github.com/repos/endrawes0/Chesster/issues/comments{/number}","contents_url":"https://api.github.com/repos/endrawes0/Chesster/contents/{+path}","compare_url":"https://api.github.com/repos/endrawes0/Chesster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endrawes0/Chesster/merges","archive_url":"https://api.github.com/repos/endrawes0/Chesster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endrawes0/Chesster/downloads","issues_url":"https://api.github.com/repos/endrawes0/Chesster/issues{/number}","pulls_url":"https://api.github.com/repos/endrawes0/Chesster/pulls{/number}","milestones_url":"https://api.github.com/repos/endrawes0/Chesster/milestones{/number}","notifications_url":"https://api.github.com/repos/endrawes0/Chesster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endrawes0/Chesster/labels{/name}","releases_url":"https://api.github.com/repos/endrawes0/Chesster/releases{/id}","deployments_url":"https://api.github.com/repos/endrawes0/Chesster/deployments","created_at":"2016-03-27T01:06:03Z","updated_at":"2016-10-02T23:41:53Z","pushed_at":"2016-10-16T01:09:52Z","git_url":"git://github.com/endrawes0/Chesster.git","ssh_url":"git@github.com:endrawes0/Chesster.git","clone_url":"https://github.com/endrawes0/Chesster.git","svn_url":"https://github.com/endrawes0/Chesster","homepage":null,"size":532,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":26,"forks":6,"open_issues":26,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/175"},"html":{"href":"https://github.com/endrawes0/Chesster/pull/175"},"issue":{"href":"https://api.github.com/repos/endrawes0/Chesster/issues/175"},"comments":{"href":"https://api.github.com/repos/endrawes0/Chesster/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endrawes0/Chesster/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/endrawes0/Chesster/statuses/915e994b68e5a509dd3049a02d7a1e52adee609b"}}}}
{"actor":{"display_login":"endrawes0"}}