{"action":"created","comment":{"url":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/comments/224643076","pull_request_review_id":164063958,"id":224643076,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDY0MzA3Ng==","diff_hunk":"@@ -0,0 +1,78 @@\n+const chai = require('chai');\n+const expect = chai.expect;\n+const Game = require('../js/Game.js');\n+const spies = require('chai-spies');\n+chai.use(spies);\n+global.data = require('../js/data.js');\n+global.domUpdates = require('../js/DOM.js');\n+global.Round = require('../js/Round.js');\n+// global.index = require('../js/index.js');\n+chai.spy.on(global.domUpdates, ['getPlayerNames', 'clearInputs', 'goToGameScreen', 'displayWinner', 'goToHomeScreen', 'displayWheel', 'hideWheel'], () => true);\n+\n+describe('Game', () => {\n+  var game;\n+  beforeEach(() => {\n+    game = new Game()\n+  })\n+\n+  it('should start at round 0', () => {\n+  expect(game.round).to.equal(0);\n+  expect(game.bonusRound).to.equal(false);\n+  });\n+\n+  it('should start with no players', () => {\n+  expect(game.players).to.deep.equal({});\n+  });\n+\n+  it('should start with 4 puzzle banks', () => {\n+    expect(game.puzzleKeys).to.deep.equal(['one_word_answers', 'two_word_answers', 'three_word_answers', 'four_word_answers']);\n+  });\n+\n+  it.skip('should be able to take in player names', () => {\n+   \n+  });\n+\n+  it('should start a new game', () => {\n+    game.init();\n+    expect(global.domUpdates.clearInputs).to.have.been.called(1);\n+    expect(global.domUpdates.goToGameScreen).to.have.been.called(1);\n+  });\n+\n+  it('should be able to start a new round', () => {\n+    game.startRound();\n+    expect(game.round).to.equal(1);\n+  });\n+\n+  it('should choose the winner of the round and push value to score', () => {\n+    game.endRound([{name: 'Player 1: Theo', score: 400}, {name: 'Player 2: Jamie', score: -200}, {name: 'Player 3: Dog', score: 10000}]);\n+    expect(game.players['Player 3: Dog']).to.equal(10000)\n+  });\n+\n+  it('should reset everyones wallet', () => {\n+    let result = game.endRound([{name: 'Player 1: Theo', score: 400}, {name: 'Player 2: Jamie', score: -200}, {name: 'Player 3: Dog', score: 10000}]);\n+    expect(result).to.deep.equal([{name: 'Player 1: Theo', score: 0}, {name: 'Player 2: Jamie', score: 0}, {name: 'Player 3: Dog', score: 0}])\n+  });\n+\n+  it('should end game', () => {\n+    game.players = {'player1: Theo': 400, 'player2: Jamie': 500, 'player3: Bartholimule': 700};\n+    game.endGame();\n+    expect(global.domUpdates.displayWinner).to.have.been.called(1);\n+    expect(global.domUpdates.displayWinner).to.have.been.called.with('player3: Bartholimule', 700)\n+  });\n+\n+  it('should show homescreen when quit button is pressed', () => {\n+    game.quitGame();\n+    expect(global.domUpdates.goToHomeScreen).to.have.been.called(1);\n+  });","path":"test/Game-test.js","position":66,"original_position":66,"commit_id":"7b4ac4783b5a552dc5e4fae6a1deecc23d21cb46","original_commit_id":"7b4ac4783b5a552dc5e4fae6a1deecc23d21cb46","user":{"login":"brittanystoroz","id":856935,"node_id":"MDQ6VXNlcjg1NjkzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/856935?v=4","gravatar_id":"","url":"https://api.github.com/users/brittanystoroz","html_url":"https://github.com/brittanystoroz","followers_url":"https://api.github.com/users/brittanystoroz/followers","following_url":"https://api.github.com/users/brittanystoroz/following{/other_user}","gists_url":"https://api.github.com/users/brittanystoroz/gists{/gist_id}","starred_url":"https://api.github.com/users/brittanystoroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brittanystoroz/subscriptions","organizations_url":"https://api.github.com/users/brittanystoroz/orgs","repos_url":"https://api.github.com/users/brittanystoroz/repos","events_url":"https://api.github.com/users/brittanystoroz/events{/privacy}","received_events_url":"https://api.github.com/users/brittanystoroz/received_events","type":"User","site_admin":false},"body":"This is a good test description and assertion 👍 ","created_at":"2018-10-12T00:34:26Z","updated_at":"2018-10-12T00:34:26Z","html_url":"https://github.com/b3an5/wheel-of-fortune/pull/23#discussion_r224643076","pull_request_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/23","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/comments/224643076"},"html":{"href":"https://github.com/b3an5/wheel-of-fortune/pull/23#discussion_r224643076"},"pull_request":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/23","id":222300959,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMzAwOTU5","html_url":"https://github.com/b3an5/wheel-of-fortune/pull/23","diff_url":"https://github.com/b3an5/wheel-of-fortune/pull/23.diff","patch_url":"https://github.com/b3an5/wheel-of-fortune/pull/23.patch","issue_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues/23","number":23,"state":"closed","locked":false,"title":"added game test","user":{"login":"b3an5","id":40470660,"node_id":"MDQ6VXNlcjQwNDcwNjYw","avatar_url":"https://avatars3.githubusercontent.com/u/40470660?v=4","gravatar_id":"","url":"https://api.github.com/users/b3an5","html_url":"https://github.com/b3an5","followers_url":"https://api.github.com/users/b3an5/followers","following_url":"https://api.github.com/users/b3an5/following{/other_user}","gists_url":"https://api.github.com/users/b3an5/gists{/gist_id}","starred_url":"https://api.github.com/users/b3an5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b3an5/subscriptions","organizations_url":"https://api.github.com/users/b3an5/orgs","repos_url":"https://api.github.com/users/b3an5/repos","events_url":"https://api.github.com/users/b3an5/events{/privacy}","received_events_url":"https://api.github.com/users/b3an5/received_events","type":"User","site_admin":false},"body":"@thatPamIam @brittanyStoroz\r\nthis pull request has the game test file. we had a question about line 31 in Game-test.js. can we test objects returned from the dom? this relates to line 10 in our game.js file","created_at":"2018-10-11T22:41:53Z","updated_at":"2018-10-12T00:34:26Z","closed_at":"2018-10-11T22:46:58Z","merged_at":"2018-10-11T22:46:58Z","merge_commit_sha":"f82f601586e7e92ca97c6995fb0eda5a67c49fa4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/23/commits","review_comments_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/23/comments","review_comment_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/comments{/number}","comments_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues/23/comments","statuses_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/statuses/7b4ac4783b5a552dc5e4fae6a1deecc23d21cb46","head":{"label":"b3an5:game-test-suite","ref":"game-test-suite","sha":"7b4ac4783b5a552dc5e4fae6a1deecc23d21cb46","user":{"login":"b3an5","id":40470660,"node_id":"MDQ6VXNlcjQwNDcwNjYw","avatar_url":"https://avatars3.githubusercontent.com/u/40470660?v=4","gravatar_id":"","url":"https://api.github.com/users/b3an5","html_url":"https://github.com/b3an5","followers_url":"https://api.github.com/users/b3an5/followers","following_url":"https://api.github.com/users/b3an5/following{/other_user}","gists_url":"https://api.github.com/users/b3an5/gists{/gist_id}","starred_url":"https://api.github.com/users/b3an5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b3an5/subscriptions","organizations_url":"https://api.github.com/users/b3an5/orgs","repos_url":"https://api.github.com/users/b3an5/repos","events_url":"https://api.github.com/users/b3an5/events{/privacy}","received_events_url":"https://api.github.com/users/b3an5/received_events","type":"User","site_admin":false},"repo":{"id":152317803,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIzMTc4MDM=","name":"wheel-of-fortune","full_name":"b3an5/wheel-of-fortune","private":false,"owner":{"login":"b3an5","id":40470660,"node_id":"MDQ6VXNlcjQwNDcwNjYw","avatar_url":"https://avatars3.githubusercontent.com/u/40470660?v=4","gravatar_id":"","url":"https://api.github.com/users/b3an5","html_url":"https://github.com/b3an5","followers_url":"https://api.github.com/users/b3an5/followers","following_url":"https://api.github.com/users/b3an5/following{/other_user}","gists_url":"https://api.github.com/users/b3an5/gists{/gist_id}","starred_url":"https://api.github.com/users/b3an5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b3an5/subscriptions","organizations_url":"https://api.github.com/users/b3an5/orgs","repos_url":"https://api.github.com/users/b3an5/repos","events_url":"https://api.github.com/users/b3an5/events{/privacy}","received_events_url":"https://api.github.com/users/b3an5/received_events","type":"User","site_admin":false},"html_url":"https://github.com/b3an5/wheel-of-fortune","description":"a web based playable wheel of fortune game","fork":false,"url":"https://api.github.com/repos/b3an5/wheel-of-fortune","forks_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/forks","keys_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/teams","hooks_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/hooks","issue_events_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues/events{/number}","events_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/events","assignees_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/assignees{/user}","branches_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/branches{/branch}","tags_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/tags","blobs_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/refs{/sha}","trees_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/statuses/{sha}","languages_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/languages","stargazers_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/stargazers","contributors_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/contributors","subscribers_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/subscribers","subscription_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/subscription","commits_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/commits{/sha}","git_commits_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/commits{/sha}","comments_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/comments{/number}","issue_comment_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues/comments{/number}","contents_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/contents/{+path}","compare_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/merges","archive_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/downloads","issues_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues{/number}","pulls_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls{/number}","milestones_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/milestones{/number}","notifications_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/labels{/name}","releases_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/releases{/id}","deployments_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/deployments","created_at":"2018-10-09T20:37:39Z","updated_at":"2018-10-11T22:47:00Z","pushed_at":"2018-10-11T22:46:58Z","git_url":"git://github.com/b3an5/wheel-of-fortune.git","ssh_url":"git@github.com:b3an5/wheel-of-fortune.git","clone_url":"https://github.com/b3an5/wheel-of-fortune.git","svn_url":"https://github.com/b3an5/wheel-of-fortune","homepage":null,"size":158,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":0,"open_issues":13,"watchers":0,"default_branch":"master"}},"base":{"label":"b3an5:master","ref":"master","sha":"56d71f229f5c7450c0e186be165863f37f7f925a","user":{"login":"b3an5","id":40470660,"node_id":"MDQ6VXNlcjQwNDcwNjYw","avatar_url":"https://avatars3.githubusercontent.com/u/40470660?v=4","gravatar_id":"","url":"https://api.github.com/users/b3an5","html_url":"https://github.com/b3an5","followers_url":"https://api.github.com/users/b3an5/followers","following_url":"https://api.github.com/users/b3an5/following{/other_user}","gists_url":"https://api.github.com/users/b3an5/gists{/gist_id}","starred_url":"https://api.github.com/users/b3an5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b3an5/subscriptions","organizations_url":"https://api.github.com/users/b3an5/orgs","repos_url":"https://api.github.com/users/b3an5/repos","events_url":"https://api.github.com/users/b3an5/events{/privacy}","received_events_url":"https://api.github.com/users/b3an5/received_events","type":"User","site_admin":false},"repo":{"id":152317803,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIzMTc4MDM=","name":"wheel-of-fortune","full_name":"b3an5/wheel-of-fortune","private":false,"owner":{"login":"b3an5","id":40470660,"node_id":"MDQ6VXNlcjQwNDcwNjYw","avatar_url":"https://avatars3.githubusercontent.com/u/40470660?v=4","gravatar_id":"","url":"https://api.github.com/users/b3an5","html_url":"https://github.com/b3an5","followers_url":"https://api.github.com/users/b3an5/followers","following_url":"https://api.github.com/users/b3an5/following{/other_user}","gists_url":"https://api.github.com/users/b3an5/gists{/gist_id}","starred_url":"https://api.github.com/users/b3an5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b3an5/subscriptions","organizations_url":"https://api.github.com/users/b3an5/orgs","repos_url":"https://api.github.com/users/b3an5/repos","events_url":"https://api.github.com/users/b3an5/events{/privacy}","received_events_url":"https://api.github.com/users/b3an5/received_events","type":"User","site_admin":false},"html_url":"https://github.com/b3an5/wheel-of-fortune","description":"a web based playable wheel of fortune game","fork":false,"url":"https://api.github.com/repos/b3an5/wheel-of-fortune","forks_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/forks","keys_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/teams","hooks_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/hooks","issue_events_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues/events{/number}","events_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/events","assignees_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/assignees{/user}","branches_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/branches{/branch}","tags_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/tags","blobs_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/refs{/sha}","trees_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/statuses/{sha}","languages_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/languages","stargazers_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/stargazers","contributors_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/contributors","subscribers_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/subscribers","subscription_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/subscription","commits_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/commits{/sha}","git_commits_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/git/commits{/sha}","comments_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/comments{/number}","issue_comment_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues/comments{/number}","contents_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/contents/{+path}","compare_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/merges","archive_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/downloads","issues_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues{/number}","pulls_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls{/number}","milestones_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/milestones{/number}","notifications_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/labels{/name}","releases_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/releases{/id}","deployments_url":"https://api.github.com/repos/b3an5/wheel-of-fortune/deployments","created_at":"2018-10-09T20:37:39Z","updated_at":"2018-10-11T22:47:00Z","pushed_at":"2018-10-11T22:46:58Z","git_url":"git://github.com/b3an5/wheel-of-fortune.git","ssh_url":"git@github.com:b3an5/wheel-of-fortune.git","clone_url":"https://github.com/b3an5/wheel-of-fortune.git","svn_url":"https://github.com/b3an5/wheel-of-fortune","homepage":null,"size":158,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":0,"open_issues":13,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/23"},"html":{"href":"https://github.com/b3an5/wheel-of-fortune/pull/23"},"issue":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues/23"},"comments":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/b3an5/wheel-of-fortune/statuses/7b4ac4783b5a552dc5e4fae6a1deecc23d21cb46"}},"author_association":"OWNER"}}
{"actor":{"display_login":"brittanystoroz"}}