Skip to content

Conversation

@skabbass1
Copy link
Contributor

@skabbass1 skabbass1 commented Aug 15, 2017

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

Merge branch 'master' into port-proverb-exercise-from-javascript

commit d1d8a82
Author: Syed Abbas syed.k.abbas1988@gmail.com
Date: Thu Aug 10 14:02:19 2017 -0500

Add exercise run-length-encoding (#335)

commit 242942b
Author: sabbas syed.k.abbas1988@gmail.com
Date: Thu Aug 10 07:09:53 2017 -0500

Port Proverb Exercise from JavaScript Track

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:


expect(result).toEqual(
'For want of a nail the shoe was lost.\n' +
'For want of a shoe the horse was lost.\n' +
Copy link
Contributor Author

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?

Copy link
Contributor

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.
...`

Copy link
Contributor Author

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

@matthewmorgan
Copy link
Contributor

Nice clean implementation. Well done.

@skabbass1 skabbass1 force-pushed the add-exercise-proverb branch from e67504b to 7f24d45 Compare August 17, 2017 10:55
return chainOfEvents.join('\n');
};


Copy link
Member

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.

Copy link
Contributor Author

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.

expect(proverb('nail', 'shoe')).toEqual(proverb('nail', 'shoe'));
});


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra blank lines.

import proverb from './proverb';


describe('Proverb xtest Suite', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks

@skabbass1 skabbass1 force-pushed the add-exercise-proverb branch from 7f24d45 to 256674d Compare August 21, 2017 10:35
@skabbass1 skabbass1 force-pushed the add-exercise-proverb branch from 256674d to 59638b0 Compare August 21, 2017 10:43
@matthewmorgan matthewmorgan merged commit d1d61c4 into exercism:master Aug 21, 2017
@matthewmorgan
Copy link
Contributor

Nice 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.

4 participants