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

adds app.route.[put,post.delete] to app.route mock. #125

Merged
merged 3 commits into from Dec 6, 2018

Conversation

Projects
None yet
2 participants
@mattmarcello

mattmarcello commented Dec 5, 2018

What:

The current mocks are incomplete.

Why:

Cannot mock a call to app.route.post[post,put.delete];

How:

Update the mock to include the missing methods.

mmarcello added some commits Dec 5, 2018

mmarcello
fix(express.route mock): adds mock for app.route.[put,post,delete], t…
…o compliment app.route.get

The current mocks are incomplete. They can result in failures, for example, when testins a route
that registers a post handler.
mmarcello
@jameswlane

This comment has been minimized.

Owner

jameswlane commented Dec 6, 2018

@mattmarcello, Thank you so much for making this pull request.

I would be more than happy to pull this in, and cut a new release as soon as possible. Could you please add three test cases for the delete, post, and put methods you have added to the code. I would like to make ensure we have test covering new code so as the project grows we don't break things.

Also if you would like to add yourself to the contributors list that would be awesome also.

@jameswlane

Once test are added I will be more than happy to pull this in.

@@ -100,7 +100,10 @@ export class Express {
// TODO app.route(path)
this.route = jest.fn(() => {
return {
delete: this.delete,

This comment has been minimized.

@jameswlane

jameswlane Dec 6, 2018

Owner

Could we please add test for the new code added.

@mattmarcello

This comment has been minimized.

mattmarcello commented Dec 6, 2018

tests added.

@jameswlane

This comment has been minimized.

Owner

jameswlane commented Dec 6, 2018

Awesome, I will pull this in and cut a new release tonight.

@jameswlane jameswlane merged commit 8f92ded into jameswlane:master Dec 6, 2018

1 check passed

Hound No violations found. Woof!
@jameswlane

This comment has been minimized.

Owner

jameswlane commented Dec 6, 2018

🎉 This PR is included in version 1.9.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jameswlane jameswlane added the released label Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment