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

Make warrior upset when losing points #107

Merged
merged 4 commits into from
May 17, 2018
Merged

Conversation

skywalker212
Copy link
Contributor

@skywalker212 skywalker212 commented May 16, 2018

Closes #104

@codecov-io
Copy link

codecov-io commented May 16, 2018

Codecov Report

Merging #107 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #107      +/-   ##
==========================================
+ Coverage   90.84%   90.87%   +0.02%     
==========================================
  Files          80       80              
  Lines        1016     1019       +3     
  Branches      158      158              
==========================================
+ Hits          923      926       +3     
  Misses         77       77              
  Partials       16       16
Impacted Files Coverage Δ
packages/warriorjs-core/src/Warrior.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42ad255...d872b7d. Read the comment docs.

Copy link
Owner

@olistic olistic left a comment

Choose a reason for hiding this comment

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

@skywalker212 Looks good, but it's missing a unit test. Would you mind adding it?

@skywalker212
Copy link
Contributor Author

@olistic ya sure, but I don't know how to add a unit test, can you tell me how to add one?

@olistic
Copy link
Owner

olistic commented May 16, 2018

@skywalker212 Sure. In this particular case, it's super easy. Just look at the earning points test in Warrior.test.js and base yours on that one!

@skywalker212
Copy link
Contributor Author

@olistic I have added the unit test, please review.

warrior.losePoints(5);
expect(warrior.say).toHaveBeenCalledWith('loses 5 points');
});

Copy link
Owner

@olistic olistic May 16, 2018

Choose a reason for hiding this comment

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

@skywalker212 Linting is complaining because of this extra line break, you need to remove the empty line.

@olistic olistic changed the title #104 overridden losePoints method to make warrior upset when losing points Make warrior upset when losing points May 16, 2018
@skywalker212
Copy link
Contributor Author

@olistic I have made the changes, please review.

Copy link
Owner

@olistic olistic left a comment

Choose a reason for hiding this comment

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

Thanks @skywalker212!

@olistic olistic merged commit bf51abd into olistic:master May 17, 2018
@skywalker212
Copy link
Contributor Author

@olistic Thanks for guiding through problems!

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.

None yet

3 participants