From 44534abb215f14282486a26239120f2f5a0005f9 Mon Sep 17 00:00:00 2001 From: KaKa Date: Tue, 16 Jul 2024 16:04:40 +0800 Subject: [PATCH] test: remove mixed async and callback --- test/commonjs/basic/encapsulate/plugin2.js | 2 +- test/issues/374/routes/entity/_entity/index.js | 2 +- test/issues/374/routes/entity/index.js | 2 +- test/issues/374/routes/index.js | 2 +- test/issues/376/routes/entity/index.js | 2 +- test/issues/376/routes/index.js | 2 +- test/issues/388/routes/foo.tsx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/commonjs/basic/encapsulate/plugin2.js b/test/commonjs/basic/encapsulate/plugin2.js index 2db036f9..1a2256ac 100644 --- a/test/commonjs/basic/encapsulate/plugin2.js +++ b/test/commonjs/basic/encapsulate/plugin2.js @@ -1,6 +1,6 @@ 'use strict' -module.exports = async (fastify, opts, next) => { +module.exports = async (fastify, opts) => { fastify.get('/encapsulate', { handler: async (request, reply) => { reply.status(200).send({ works: fastify.sharedVar }) diff --git a/test/issues/374/routes/entity/_entity/index.js b/test/issues/374/routes/entity/_entity/index.js index c6d63048..94dd1b8d 100644 --- a/test/issues/374/routes/entity/_entity/index.js +++ b/test/issues/374/routes/entity/_entity/index.js @@ -1,6 +1,6 @@ 'use strict' -module.exports = async function (app, opts, next) { +module.exports = async function (app, opts) { app.get('/', async function (req, reply) { reply.status(200).send({ path: req.url, hooked: req.hooked, params: req.params }) }) diff --git a/test/issues/374/routes/entity/index.js b/test/issues/374/routes/entity/index.js index 0b14399b..f6192de6 100644 --- a/test/issues/374/routes/entity/index.js +++ b/test/issues/374/routes/entity/index.js @@ -1,6 +1,6 @@ 'use strict' -module.exports = async function (app, opts, next) { +module.exports = async function (app, opts) { app.get('/', async function (req, reply) { reply.status(200).send({ path: req.url, hooked: req.hooked }) }) diff --git a/test/issues/374/routes/index.js b/test/issues/374/routes/index.js index 51a699b4..720a3ed9 100644 --- a/test/issues/374/routes/index.js +++ b/test/issues/374/routes/index.js @@ -1,6 +1,6 @@ 'use strict' -module.exports = async function (app, opts, next) { +module.exports = async function (app, opts) { app.get('/', async function (req, reply) { reply.status(200).send({ path: req.url }) }) diff --git a/test/issues/376/routes/entity/index.js b/test/issues/376/routes/entity/index.js index 0b14399b..f6192de6 100644 --- a/test/issues/376/routes/entity/index.js +++ b/test/issues/376/routes/entity/index.js @@ -1,6 +1,6 @@ 'use strict' -module.exports = async function (app, opts, next) { +module.exports = async function (app, opts) { app.get('/', async function (req, reply) { reply.status(200).send({ path: req.url, hooked: req.hooked }) }) diff --git a/test/issues/376/routes/index.js b/test/issues/376/routes/index.js index 51a699b4..720a3ed9 100644 --- a/test/issues/376/routes/index.js +++ b/test/issues/376/routes/index.js @@ -1,6 +1,6 @@ 'use strict' -module.exports = async function (app, opts, next) { +module.exports = async function (app, opts) { app.get('/', async function (req, reply) { reply.status(200).send({ path: req.url }) }) diff --git a/test/issues/388/routes/foo.tsx b/test/issues/388/routes/foo.tsx index 4a8100b6..c90635e1 100644 --- a/test/issues/388/routes/foo.tsx +++ b/test/issues/388/routes/foo.tsx @@ -1,6 +1,6 @@ 'use strict' -module.exports = async function (app, opts, next) { +module.exports = async function (app, opts) { app.get('/', async function (req, reply) { reply.status(200).send({ tsx: 'ok' }) })