Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

&&: Kate #20

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

&&: Kate #20

wants to merge 17 commits into from

Conversation

Oh-KPond
Copy link

@Oh-KPond Oh-KPond commented May 18, 2018

JS Scrabble

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What patterns were you able to use from your Ruby knowledge to apply to JavaScript? if and if else statements are very similar in both languages. It was also helpful to understand that regular data structures like Hashes and Arrays have functions that can be called on them, and could be accessed in a very similar way as they could in Ruby.
What was a challenge you faced in this assignment? I don't understand why a few of my tests aren't passing. There is an error thrown, even if it isn't the expected error. Shouldn't any error thrown constitute as a passing test if you're just looking for an error?
Do you have any recommendations on how we could improve this project for the next cohort? I think that maybe having the "solution" to the Ruby scrabble could be beneficial since it seems that I've heard devs sometimes have to take code that's written in one language and transfer it to another.

@tildeee
Copy link

tildeee commented May 23, 2018

JS Scrabble

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene x
Comprehension questions x
General
score calculates score, has appropriate params and return value x
highestScoreFrom calculates highest scoring word, has appropriate params and return value x
Player object
Has name and plays properties x
Has play, totalScore, hasWon functions x
Has highestScoringWord and highestWordScore functions tests fail for a reason listed below
Overall

Looks good!

Your tests fail because the syntax for expecting something to throw is that expect() should take in a function that executes the erroneous code.

For example, your code is originally:

expect(player.highestWordScore()).toThrow();

and it passes when you change it to:

expect(() => player.highestWordScore()).toThrow();

or

expect( function() { player.highestWordScore() } ).toThrow();

If I had a chance to refactor, I'd try to refactor the if/else if block in score().

Otherwise, in general, good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants