{"action":"created","comment":{"url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/comments/89220691","pull_request_review_id":9768596,"id":89220691,"diff_hunk":"@@ -0,0 +1,65 @@\n+'use strict'\n+\n+const books = require('./books.json');\n+const testIndex = new invertedIndex();\n+\n+describe('Inverted Index TestSuite', () => {\n+    describe('Inverted Index Class', () => {\n+        it('should be a class', () => {\n+            expect(testIndex instanceof invertedIndex).toBe(true);\n+            expect(testIndex instanceof Object).toBe(true);\n+            expect(typeof (testIndex)).toBe('object');\n+        });\n+\n+        it('checks for default indexMap', () => {\n+            expect(typeof (testIndex.indexMap)).toBe('object');\n+        });\n+    });\n+\n+    describe('Sanitize', function () {\n+        it('return an array with sanitized tokens', () => {\n+            expect(testIndex.sanitize((books[0].title).split(' '))).toEqual(['alice', 'in', 'wonderland']);\n+        });\n+        it('filters out symbols', function () {\n+            expect(testIndex.sanitize(['a&lice', 'i*n', 'wonderl@.and'])).toEqual(['alice', 'in', 'wonderland']);\n+        });\n+    });\n+\n+    describe('Read Book Data', () => {\n+        it('ensures that JSON file is not empty', () => {\n+            expect(books.length > 0).toBe(true);\n+        });\n+\n+    });\n+\n+    describe('Create and Populate Index', () => {\n+        let minibooks = [{ \"title\": \"A\", \"text\": \"Alice.\" }];\n+        it('verifies that the JSON has been read', () => {\n+            expect(testIndex.createIndex('books', minibooks)).toEqual(['books', [['alice', 'a']]]);\n+        });\n+        it('verifies that the index maps strings to the correct Json objects in the array', () => {\n+            expect(testIndex.storeIndex('books', [['alice', 'a']])).toEqual({ alice: ['0'], a: ['0'] });","path":"jasmine/spec/inverted-index-test.js","position":41,"original_position":41,"commit_id":"1384bc9649a0013cb96d28b5a05f6a0e22dc4d23","original_commit_id":"1384bc9649a0013cb96d28b5a05f6a0e22dc4d23","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'expect' is not defined.","created_at":"2016-11-22T22:07:20Z","updated_at":"2016-11-22T22:07:20Z","html_url":"https://github.com/andela-sayidu/invertedIndex/pull/1#discussion_r89220691","pull_request_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/comments/89220691"},"html":{"href":"https://github.com/andela-sayidu/invertedIndex/pull/1#discussion_r89220691"},"pull_request":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/1","id":94761241,"html_url":"https://github.com/andela-sayidu/invertedIndex/pull/1","diff_url":"https://github.com/andela-sayidu/invertedIndex/pull/1.diff","patch_url":"https://github.com/andela-sayidu/invertedIndex/pull/1.patch","issue_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/1","number":1,"state":"open","locked":false,"title":"Pull request for pair review","user":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-22T07:27:50Z","updated_at":"2016-11-22T22:07:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"217cc16042333cea191525bc87cef8e2c46c2bf0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/1/commits","review_comments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/1/comments","review_comment_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/1/comments","statuses_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/statuses/1384bc9649a0013cb96d28b5a05f6a0e22dc4d23","head":{"label":"andela-sayidu:develop","ref":"develop","sha":"1384bc9649a0013cb96d28b5a05f6a0e22dc4d23","user":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"repo":{"id":74242569,"name":"invertedIndex","full_name":"andela-sayidu/invertedIndex","owner":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-sayidu/invertedIndex","description":"Checkpoint 1: Inverted Index Project","fork":false,"url":"https://api.github.com/repos/andela-sayidu/invertedIndex","forks_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/forks","keys_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/teams","hooks_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/hooks","issue_events_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/events{/number}","events_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/events","assignees_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/assignees{/user}","branches_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/branches{/branch}","tags_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/tags","blobs_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/languages","stargazers_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/stargazers","contributors_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/contributors","subscribers_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/subscribers","subscription_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/subscription","commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/contents/{+path}","compare_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/merges","archive_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/downloads","issues_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues{/number}","pulls_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/labels{/name}","releases_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/releases{/id}","deployments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/deployments","created_at":"2016-11-19T23:48:56Z","updated_at":"2016-11-20T07:26:00Z","pushed_at":"2016-11-22T22:07:12Z","git_url":"git://github.com/andela-sayidu/invertedIndex.git","ssh_url":"git@github.com:andela-sayidu/invertedIndex.git","clone_url":"https://github.com/andela-sayidu/invertedIndex.git","svn_url":"https://github.com/andela-sayidu/invertedIndex","homepage":null,"size":41013,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"andela-sayidu:master","ref":"master","sha":"8574f3465e0348d1b913aefcb06d15bac5ac063c","user":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"repo":{"id":74242569,"name":"invertedIndex","full_name":"andela-sayidu/invertedIndex","owner":{"login":"andela-sayidu","id":23451229,"avatar_url":"https://avatars.githubusercontent.com/u/23451229?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-sayidu","html_url":"https://github.com/andela-sayidu","followers_url":"https://api.github.com/users/andela-sayidu/followers","following_url":"https://api.github.com/users/andela-sayidu/following{/other_user}","gists_url":"https://api.github.com/users/andela-sayidu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-sayidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-sayidu/subscriptions","organizations_url":"https://api.github.com/users/andela-sayidu/orgs","repos_url":"https://api.github.com/users/andela-sayidu/repos","events_url":"https://api.github.com/users/andela-sayidu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-sayidu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-sayidu/invertedIndex","description":"Checkpoint 1: Inverted Index Project","fork":false,"url":"https://api.github.com/repos/andela-sayidu/invertedIndex","forks_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/forks","keys_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/teams","hooks_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/hooks","issue_events_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/events{/number}","events_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/events","assignees_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/assignees{/user}","branches_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/branches{/branch}","tags_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/tags","blobs_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/languages","stargazers_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/stargazers","contributors_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/contributors","subscribers_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/subscribers","subscription_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/subscription","commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/contents/{+path}","compare_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/merges","archive_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/downloads","issues_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues{/number}","pulls_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/labels{/name}","releases_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/releases{/id}","deployments_url":"https://api.github.com/repos/andela-sayidu/invertedIndex/deployments","created_at":"2016-11-19T23:48:56Z","updated_at":"2016-11-20T07:26:00Z","pushed_at":"2016-11-22T22:07:12Z","git_url":"git://github.com/andela-sayidu/invertedIndex.git","ssh_url":"git@github.com:andela-sayidu/invertedIndex.git","clone_url":"https://github.com/andela-sayidu/invertedIndex.git","svn_url":"https://github.com/andela-sayidu/invertedIndex","homepage":null,"size":41013,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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/andela-sayidu/invertedIndex/pulls/1"},"html":{"href":"https://github.com/andela-sayidu/invertedIndex/pull/1"},"issue":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/1"},"comments":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/andela-sayidu/invertedIndex/statuses/1384bc9649a0013cb96d28b5a05f6a0e22dc4d23"}}}}
{"actor":{"display_login":"houndci-bot"}}