Skip to content

Commit 26d60ea

Browse files
authored
test: prefix unused params with underscores (#437)
1 parent 464b04a commit 26d60ea

File tree

20 files changed

+29
-29
lines changed

20 files changed

+29
-29
lines changed

test/issues/369/routes/.autohooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
4-
app.addHook('onRequest', async (req, reply) => {
3+
module.exports = async function (app) {
4+
app.addHook('onRequest', async (req) => {
55
req.hooked = req.hooked || []
66
req.hooked.push('root')
77
})

test/issues/369/routes/child/.autohooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
4-
app.addHook('onRequest', async (req, reply) => {
3+
module.exports = async function (app) {
4+
app.addHook('onRequest', async (req) => {
55
req.hooked = req.hooked || []
66
req.hooked.push('child')
77
})

test/issues/369/routes/child/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
3+
module.exports = async function (app) {
44
app.get('/', async function (req, reply) {
55
reply.status(200).send({ hooked: req.hooked })
66
})

test/issues/369/routes/promisified/.autohooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict'
22

33
module.exports = new Promise((resolve) => {
4-
resolve(async function (app, opts) {
5-
app.addHook('onRequest', async (req, reply) => {
4+
resolve(async function (app) {
5+
app.addHook('onRequest', async (req) => {
66
req.hooked = req.hooked || []
77
req.hooked.push('promisified')
88
})

test/issues/369/routes/promisified/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
3+
module.exports = async function (app) {
44
app.get('/', async function (req, reply) {
55
reply.status(200).send({ hooked: req.hooked })
66
})

test/issues/369/routes/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
3+
module.exports = async function (app) {
44
app.get('/', async function (req, reply) {
55
reply.status(200).send({ hooked: req.hooked })
66
})

test/issues/374/routes/entity/.autohooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
4-
app.addHook('onRequest', async (req, reply) => {
3+
module.exports = async function (app) {
4+
app.addHook('onRequest', async (req) => {
55
req.hooked = req.hooked || []
66
req.hooked.push('root')
77
})

test/issues/374/routes/entity/_entity/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
3+
module.exports = async function (app) {
44
app.get('/', async function (req, reply) {
55
reply.status(200).send({ path: req.url, hooked: req.hooked, params: req.params })
66
})

test/issues/374/routes/entity/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
3+
module.exports = async function (app) {
44
app.get('/', async function (req, reply) {
55
reply.status(200).send({ path: req.url, hooked: req.hooked })
66
})

test/issues/374/routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
module.exports = async function (app, opts) {
3+
module.exports = async function (app) {
44
app.get('/', async function (req, reply) {
55
reply.status(200).send({ path: req.url })
66
})

0 commit comments

Comments
 (0)