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

Add docs to stop processing hooks with async #2079

Merged
merged 6 commits into from Feb 6, 2020

Conversation

mcollina
Copy link
Member

@mcollina mcollina commented Feb 3, 2020

Fixes #2075

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

docs/Hooks.md Show resolved Hide resolved
@Eomm Eomm added the documentation Improvements or additions to documentation label Feb 4, 2020
Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

Looking good. Left some tweaks.

docs/Hooks.md Outdated Show resolved Hide resolved
docs/Hooks.md Outdated Show resolved Hide resolved
docs/Hooks.md Outdated Show resolved Hide resolved
docs/Hooks.md Outdated Show resolved Hide resolved
mcollina and others added 2 commits February 6, 2020 17:36
Co-Authored-By: James Sumners <james@sumners.email>
Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

LGTM

test/hooks-async.js Outdated Show resolved Hide resolved
@@ -2727,6 +2727,27 @@ test('onRegister hook should be called / 4', t => {
})
})

test('early termination, onRequest', t => {
Copy link
Member

Choose a reason for hiding this comment

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

Is a test for early termination with the signature (request, reply, done) already in place?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes

test('onRequest hooks should be able to block a request', t => {

Co-Authored-By: Manuel Spigolon <behemoth89@gmail.com>
@mcollina
Copy link
Member Author

mcollina commented Feb 6, 2020

@Eomm are you ok?

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use symbol to denote early termination of request
4 participants