-
-
Notifications
You must be signed in to change notification settings - Fork 655
port proverb exercise from javascript track #340
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
Conversation
exercises/proverb/proverb.spec.js
Outdated
|
|
||
| expect(result).toEqual( | ||
| 'For want of a nail the shoe was lost.\n' + | ||
| 'For want of a shoe the horse was lost.\n' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to put multiple line strings in a string template literal rather than explicitly concatenating new line strings. What do you guys think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make use of a ES6 feature, nice!
Just, be aware of spaces. The multiline string probably needs to be this way:
expect(result).toEqual(
`For want of a nail the shoe was lost.
For want of a show the horse was lost.
...`There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Will switch to string template literals and amend the commit
|
Nice clean implementation. Well done. |
e67504b to
7f24d45
Compare
exercises/proverb/example.js
Outdated
| return chainOfEvents.join('\n'); | ||
| }; | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: keep single blank lines for consitency. The ones on the top of this file can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. Thanks for pointing it out.
exercises/proverb/proverb.spec.js
Outdated
| expect(proverb('nail', 'shoe')).toEqual(proverb('nail', 'shoe')); | ||
| }); | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra blank lines.
exercises/proverb/proverb.spec.js
Outdated
| import proverb from './proverb'; | ||
|
|
||
|
|
||
| describe('Proverb xtest Suite', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Suite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks
7f24d45 to
256674d
Compare
256674d to
59638b0
Compare
|
Nice work! |
Creating a new pull request with the code changes for this exercise. I closed the old one because the git commit history for the branch associated with previous pull request did not look clean after the merge with master:
commit accd83f0e63d522f6ee1876637ed86cf952575cc
Merge: 242942b d1d8a82
Author: sabbas syed.k.abbas1988@gmail.com
Date: Tue Aug 15 06:20:46 2017 -0500
commit d1d8a82
Author: Syed Abbas syed.k.abbas1988@gmail.com
Date: Thu Aug 10 14:02:19 2017 -0500
commit 242942b
Author: sabbas syed.k.abbas1988@gmail.com
Date: Thu Aug 10 07:09:53 2017 -0500
This is probably because I created an empty pull request for the proverb exercises before the run-length-encoding pull request was merged into master: