{"action":"created","comment":{"url":"https://api.github.com/repos/google/tie/pulls/comments/110511473","pull_request_review_id":31694789,"id":110511473,"diff_hunk":"@@ -0,0 +1,102 @@\n+// Copyright 2017 The TIE Authors. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//      http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS-IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+/**\n+ * @fileoverview Unit tests for the CodeStorageService.\n+ */\n+\n+describe('CodeStorageService', function() {\n+  var LANGUAGE = 'python';\n+  var FAILED_LANGUAGE = 'java';\n+  var QUESTION_ID_LEN_RANGE = 10;\n+  var CODE_LEN_RANGE = 10000;\n+  var NUM_QUESTIONS = 5;\n+\n+  var CodeStorageService;\n+\n+  var generateRandomChars = function(number) {\n+    var generatedChars = \"\";\n+    var possible = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n+\n+    for (var i = 0; i < number; i++) {\n+      generatedChars += possible.charAt(\n+        Math.floor(Math.random() * possible.length));\n+    }\n+    return generatedChars;\n+  };\n+\n+  var sampleQuestionId = [];","path":"client/services/CodeStorageServiceSpec.js","position":39,"original_position":39,"commit_id":"320bd57495a34dc72f837c22c413f8c900de3ce0","original_commit_id":"320bd57495a34dc72f837c22c413f8c900de3ce0","user":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars3.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"body":"I would have expected something named sampleQuestionId to be a string.","created_at":"2017-04-08T06:17:15Z","updated_at":"2017-04-08T06:22:18Z","html_url":"https://github.com/google/tie/pull/152#discussion_r110511473","pull_request_url":"https://api.github.com/repos/google/tie/pulls/152","_links":{"self":{"href":"https://api.github.com/repos/google/tie/pulls/comments/110511473"},"html":{"href":"https://github.com/google/tie/pull/152#discussion_r110511473"},"pull_request":{"href":"https://api.github.com/repos/google/tie/pulls/152"}}},"pull_request":{"url":"https://api.github.com/repos/google/tie/pulls/152","id":114495759,"html_url":"https://github.com/google/tie/pull/152","diff_url":"https://github.com/google/tie/pull/152.diff","patch_url":"https://github.com/google/tie/pull/152.patch","issue_url":"https://api.github.com/repos/google/tie/issues/152","number":152,"state":"open","locked":false,"title":"Save code to browser's localStorage.","user":{"login":"wmcalyj","id":2762620,"avatar_url":"https://avatars2.githubusercontent.com/u/2762620?v=3","gravatar_id":"","url":"https://api.github.com/users/wmcalyj","html_url":"https://github.com/wmcalyj","followers_url":"https://api.github.com/users/wmcalyj/followers","following_url":"https://api.github.com/users/wmcalyj/following{/other_user}","gists_url":"https://api.github.com/users/wmcalyj/gists{/gist_id}","starred_url":"https://api.github.com/users/wmcalyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmcalyj/subscriptions","organizations_url":"https://api.github.com/users/wmcalyj/orgs","repos_url":"https://api.github.com/users/wmcalyj/repos","events_url":"https://api.github.com/users/wmcalyj/events{/privacy}","received_events_url":"https://api.github.com/users/wmcalyj/received_events","type":"User","site_admin":false},"body":"#98 \r\nAdd a feature which users can now save/load code to/from localStorage.\r\nThis event will be triggered when the user \"run\" the code or \"navigate\" through problems.\r\nIn the backend (CodeStoreService.js), an auto save function is ready to use though.","created_at":"2017-04-05T23:42:53Z","updated_at":"2017-04-08T06:22:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"514e9b8cbb85f6227dc509770c8f637867ac9854","assignee":{"login":"wmcalyj","id":2762620,"avatar_url":"https://avatars2.githubusercontent.com/u/2762620?v=3","gravatar_id":"","url":"https://api.github.com/users/wmcalyj","html_url":"https://github.com/wmcalyj","followers_url":"https://api.github.com/users/wmcalyj/followers","following_url":"https://api.github.com/users/wmcalyj/following{/other_user}","gists_url":"https://api.github.com/users/wmcalyj/gists{/gist_id}","starred_url":"https://api.github.com/users/wmcalyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmcalyj/subscriptions","organizations_url":"https://api.github.com/users/wmcalyj/orgs","repos_url":"https://api.github.com/users/wmcalyj/repos","events_url":"https://api.github.com/users/wmcalyj/events{/privacy}","received_events_url":"https://api.github.com/users/wmcalyj/received_events","type":"User","site_admin":false},"assignees":[{"login":"wmcalyj","id":2762620,"avatar_url":"https://avatars2.githubusercontent.com/u/2762620?v=3","gravatar_id":"","url":"https://api.github.com/users/wmcalyj","html_url":"https://github.com/wmcalyj","followers_url":"https://api.github.com/users/wmcalyj/followers","following_url":"https://api.github.com/users/wmcalyj/following{/other_user}","gists_url":"https://api.github.com/users/wmcalyj/gists{/gist_id}","starred_url":"https://api.github.com/users/wmcalyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmcalyj/subscriptions","organizations_url":"https://api.github.com/users/wmcalyj/orgs","repos_url":"https://api.github.com/users/wmcalyj/repos","events_url":"https://api.github.com/users/wmcalyj/events{/privacy}","received_events_url":"https://api.github.com/users/wmcalyj/received_events","type":"User","site_admin":false},{"login":"sniffsky","id":15175248,"avatar_url":"https://avatars3.githubusercontent.com/u/15175248?v=3","gravatar_id":"","url":"https://api.github.com/users/sniffsky","html_url":"https://github.com/sniffsky","followers_url":"https://api.github.com/users/sniffsky/followers","following_url":"https://api.github.com/users/sniffsky/following{/other_user}","gists_url":"https://api.github.com/users/sniffsky/gists{/gist_id}","starred_url":"https://api.github.com/users/sniffsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sniffsky/subscriptions","organizations_url":"https://api.github.com/users/sniffsky/orgs","repos_url":"https://api.github.com/users/sniffsky/repos","events_url":"https://api.github.com/users/sniffsky/events{/privacy}","received_events_url":"https://api.github.com/users/sniffsky/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/google/tie/pulls/152/commits","review_comments_url":"https://api.github.com/repos/google/tie/pulls/152/comments","review_comment_url":"https://api.github.com/repos/google/tie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/tie/issues/152/comments","statuses_url":"https://api.github.com/repos/google/tie/statuses/320bd57495a34dc72f837c22c413f8c900de3ce0","head":{"label":"google:save-code-local-storage","ref":"save-code-local-storage","sha":"320bd57495a34dc72f837c22c413f8c900de3ce0","user":{"login":"google","id":1342004,"avatar_url":"https://avatars2.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":81500046,"name":"tie","full_name":"google/tie","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars2.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/tie","description":null,"fork":false,"url":"https://api.github.com/repos/google/tie","forks_url":"https://api.github.com/repos/google/tie/forks","keys_url":"https://api.github.com/repos/google/tie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/tie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/tie/teams","hooks_url":"https://api.github.com/repos/google/tie/hooks","issue_events_url":"https://api.github.com/repos/google/tie/issues/events{/number}","events_url":"https://api.github.com/repos/google/tie/events","assignees_url":"https://api.github.com/repos/google/tie/assignees{/user}","branches_url":"https://api.github.com/repos/google/tie/branches{/branch}","tags_url":"https://api.github.com/repos/google/tie/tags","blobs_url":"https://api.github.com/repos/google/tie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/tie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/tie/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/tie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/tie/statuses/{sha}","languages_url":"https://api.github.com/repos/google/tie/languages","stargazers_url":"https://api.github.com/repos/google/tie/stargazers","contributors_url":"https://api.github.com/repos/google/tie/contributors","subscribers_url":"https://api.github.com/repos/google/tie/subscribers","subscription_url":"https://api.github.com/repos/google/tie/subscription","commits_url":"https://api.github.com/repos/google/tie/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/tie/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/tie/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/tie/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/tie/contents/{+path}","compare_url":"https://api.github.com/repos/google/tie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/tie/merges","archive_url":"https://api.github.com/repos/google/tie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/tie/downloads","issues_url":"https://api.github.com/repos/google/tie/issues{/number}","pulls_url":"https://api.github.com/repos/google/tie/pulls{/number}","milestones_url":"https://api.github.com/repos/google/tie/milestones{/number}","notifications_url":"https://api.github.com/repos/google/tie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/tie/labels{/name}","releases_url":"https://api.github.com/repos/google/tie/releases{/id}","deployments_url":"https://api.github.com/repos/google/tie/deployments","created_at":"2017-02-09T22:11:24Z","updated_at":"2017-04-08T06:22:00Z","pushed_at":"2017-04-07T23:40:50Z","git_url":"git://github.com/google/tie.git","ssh_url":"git@github.com:google/tie.git","clone_url":"https://github.com/google/tie.git","svn_url":"https://github.com/google/tie","homepage":null,"size":846,"stargazers_count":60,"watchers_count":60,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":61,"forks":11,"open_issues":61,"watchers":60,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"376bc9e707b27adae55d4ae5e574e27a4eed7103","user":{"login":"google","id":1342004,"avatar_url":"https://avatars2.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":81500046,"name":"tie","full_name":"google/tie","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars2.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/tie","description":null,"fork":false,"url":"https://api.github.com/repos/google/tie","forks_url":"https://api.github.com/repos/google/tie/forks","keys_url":"https://api.github.com/repos/google/tie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/tie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/tie/teams","hooks_url":"https://api.github.com/repos/google/tie/hooks","issue_events_url":"https://api.github.com/repos/google/tie/issues/events{/number}","events_url":"https://api.github.com/repos/google/tie/events","assignees_url":"https://api.github.com/repos/google/tie/assignees{/user}","branches_url":"https://api.github.com/repos/google/tie/branches{/branch}","tags_url":"https://api.github.com/repos/google/tie/tags","blobs_url":"https://api.github.com/repos/google/tie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/tie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/tie/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/tie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/tie/statuses/{sha}","languages_url":"https://api.github.com/repos/google/tie/languages","stargazers_url":"https://api.github.com/repos/google/tie/stargazers","contributors_url":"https://api.github.com/repos/google/tie/contributors","subscribers_url":"https://api.github.com/repos/google/tie/subscribers","subscription_url":"https://api.github.com/repos/google/tie/subscription","commits_url":"https://api.github.com/repos/google/tie/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/tie/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/tie/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/tie/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/tie/contents/{+path}","compare_url":"https://api.github.com/repos/google/tie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/tie/merges","archive_url":"https://api.github.com/repos/google/tie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/tie/downloads","issues_url":"https://api.github.com/repos/google/tie/issues{/number}","pulls_url":"https://api.github.com/repos/google/tie/pulls{/number}","milestones_url":"https://api.github.com/repos/google/tie/milestones{/number}","notifications_url":"https://api.github.com/repos/google/tie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/tie/labels{/name}","releases_url":"https://api.github.com/repos/google/tie/releases{/id}","deployments_url":"https://api.github.com/repos/google/tie/deployments","created_at":"2017-02-09T22:11:24Z","updated_at":"2017-04-08T06:22:00Z","pushed_at":"2017-04-07T23:40:50Z","git_url":"git://github.com/google/tie.git","ssh_url":"git@github.com:google/tie.git","clone_url":"https://github.com/google/tie.git","svn_url":"https://github.com/google/tie","homepage":null,"size":846,"stargazers_count":60,"watchers_count":60,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":61,"forks":11,"open_issues":61,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/tie/pulls/152"},"html":{"href":"https://github.com/google/tie/pull/152"},"issue":{"href":"https://api.github.com/repos/google/tie/issues/152"},"comments":{"href":"https://api.github.com/repos/google/tie/issues/152/comments"},"review_comments":{"href":"https://api.github.com/repos/google/tie/pulls/152/comments"},"review_comment":{"href":"https://api.github.com/repos/google/tie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/tie/pulls/152/commits"},"statuses":{"href":"https://api.github.com/repos/google/tie/statuses/320bd57495a34dc72f837c22c413f8c900de3ce0"}}}}
{"actor":{"display_login":"seanlip"}}