diff --git a/README.md b/README.md index 8902df78..c5be2ce0 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ Autoload can be customised using the following options: - `scriptPattern` (optional) - Regex to override the script files accepted by default. You should only use this option -with a [customization hooks](https://nodejs.org/docs/latest/api/module.html#customization-hooks) +with a [customization hooks](https://nodejs.org/docs/latest/api/module.html#customization-hooks) provider, such as `ts-node`. Otherwise, widening the acceptance extension here will result in error. diff --git a/test/module/autohooks/routes/.autohooks.mjs b/test/module/autohooks/routes/.autohooks.mjs index f3c0a412..05a61825 100644 --- a/test/module/autohooks/routes/.autohooks.mjs +++ b/test/module/autohooks/routes/.autohooks.mjs @@ -1,4 +1,4 @@ -export default async function (app, opts) { +export default async function (app, opts) { app.addHook('onRequest', async (req, reply) => { req.hooked = req.hooked || [] req.hooked.push('root') diff --git a/test/module/autohooks/routes/child/.autohooks.mjs b/test/module/autohooks/routes/child/.autohooks.mjs index 2a6fff98..4841277f 100644 --- a/test/module/autohooks/routes/child/.autohooks.mjs +++ b/test/module/autohooks/routes/child/.autohooks.mjs @@ -1,4 +1,4 @@ -export default async function (app, opts) { +export default async function (app, opts) { app.addHook('onRequest', async (req, reply) => { req.hooked = req.hooked || [] req.hooked.push('child') diff --git a/test/module/autohooks/routes/child/grandchild/.autohooks.mjs b/test/module/autohooks/routes/child/grandchild/.autohooks.mjs index beb08001..5ee9091c 100644 --- a/test/module/autohooks/routes/child/grandchild/.autohooks.mjs +++ b/test/module/autohooks/routes/child/grandchild/.autohooks.mjs @@ -1,4 +1,4 @@ -export default async function (app, opts) { +export default async function (app, opts) { app.addHook('onRequest', async (req, reply) => { req.hooked = req.hooked || [] req.hooked.push('grandchild')