Skip to content

Commit efb3922

Browse files
authored
test: remove unused params (#847)
1 parent abbee25 commit efb3922

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

examples/dynamic-overwrite-endpoint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fastify.register(async function (fastify) {
5555
}
5656
}
5757
}
58-
}, (req, reply) => {})
58+
}, () => {})
5959
})
6060

6161
fastify.listen({ port: 3000 }, err => {

examples/json-in-querystring.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const fastify = require('fastify')({
2323

2424
ajv.addKeyword({
2525
keyword: 'x-consume',
26-
code: (ctx) => Promise.resolve(true)
26+
code: () => Promise.resolve(true)
2727
})
2828

2929
fastify.setValidatorCompiler(({ schema }) => ajv.compile(schema))
@@ -67,6 +67,6 @@ fastify.register(async function (fastify) {
6767
})
6868
})
6969

70-
fastify.listen({ port: 3000 }, (err, addr) => {
70+
fastify.listen({ port: 3000 }, (err) => {
7171
if (err) throw err
7272
})

test/spec/openapi/refs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ test('uses examples if has property required in body', async (t) => {
296296
}
297297
}
298298
}
299-
}, (req, reply) => ({ result: 'OK' }))
299+
}, () => ({ result: 'OK' }))
300300

301301
await fastify.ready()
302302

test/types/http2-types.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ app.put('/some-route/:id', {
2828
summary: 'qwerty',
2929
security: [{ apiKey: [] }]
3030
}
31-
}, (req, reply) => {})
31+
}, () => {})
3232

3333
app.get('/public/route', {
3434
schema: {
3535
description: 'returns 200 OK',
3636
summary: 'qwerty',
3737
security: []
3838
}
39-
}, (req, reply) => {})
39+
}, () => {})
4040

4141
app
4242
.register(fastifySwagger, {

test/types/types.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ app.get('/deprecated', {
5555
deprecated: true,
5656
hide: true
5757
}
58-
}, (req, reply) => {})
58+
}, () => {})
5959

6060
app.put('/some-route/:id', {
6161
schema: {
@@ -70,7 +70,7 @@ app.put('/some-route/:id', {
7070
description: 'Find more info here'
7171
},
7272
}
73-
}, (req, reply) => {})
73+
}, () => {})
7474

7575
app.put('/image.png', {
7676
schema: {
@@ -101,7 +101,7 @@ app.get('/public/route', {
101101
links: {
102102
200: { 'some-route': { operationId: 'opeId' } }
103103
}
104-
}, (req, reply) => {})
104+
}, () => {})
105105

106106
app.get('/public/readonly-schema-route', {
107107
schema: {
@@ -114,7 +114,7 @@ app.get('/public/readonly-schema-route', {
114114
links: {
115115
200: { 'some-route': { operationId: 'opeId' } }
116116
}
117-
} as const, (req, reply) => {})
117+
} as const, () => {})
118118

119119
app
120120
.register(fastifySwagger, {

0 commit comments

Comments
 (0)