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

[question] Handler overrides #2

Closed
ghost opened this issue Feb 2, 2017 · 1 comment
Closed

[question] Handler overrides #2

ghost opened this issue Feb 2, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 2, 2017

Hi, is there any way to override a handler using the "on(...)" method? I saw that handlers are pushed into an array, and then, if a new handler for the same kind of request is pushed, the previous one takes precedence.
If this array push is changed to a "unshift" operation the new handlers will be found first when filtering to handle a mocked request. What do you think?

@pracucci
Copy link
Collaborator

pracucci commented Feb 2, 2017

You're right and your suggestion makes sense to me. Are you willing to submit a PR with the change, please?

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

No branches or pull requests

1 participant