Skip to content

Commit

Permalink
test: remove unused params (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Jan 5, 2025
1 parent abbee25 commit efb3922
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/dynamic-overwrite-endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fastify.register(async function (fastify) {
}
}
}
}, (req, reply) => {})
}, () => {})
})

fastify.listen({ port: 3000 }, err => {
Expand Down
4 changes: 2 additions & 2 deletions examples/json-in-querystring.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const fastify = require('fastify')({

ajv.addKeyword({
keyword: 'x-consume',
code: (ctx) => Promise.resolve(true)
code: () => Promise.resolve(true)
})

fastify.setValidatorCompiler(({ schema }) => ajv.compile(schema))
Expand Down Expand Up @@ -67,6 +67,6 @@ fastify.register(async function (fastify) {
})
})

fastify.listen({ port: 3000 }, (err, addr) => {
fastify.listen({ port: 3000 }, (err) => {
if (err) throw err
})
2 changes: 1 addition & 1 deletion test/spec/openapi/refs.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ test('uses examples if has property required in body', async (t) => {
}
}
}
}, (req, reply) => ({ result: 'OK' }))
}, () => ({ result: 'OK' }))

await fastify.ready()

Expand Down
4 changes: 2 additions & 2 deletions test/types/http2-types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ app.put('/some-route/:id', {
summary: 'qwerty',
security: [{ apiKey: [] }]
}
}, (req, reply) => {})
}, () => {})

app.get('/public/route', {
schema: {
description: 'returns 200 OK',
summary: 'qwerty',
security: []
}
}, (req, reply) => {})
}, () => {})

app
.register(fastifySwagger, {
Expand Down
8 changes: 4 additions & 4 deletions test/types/types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ app.get('/deprecated', {
deprecated: true,
hide: true
}
}, (req, reply) => {})
}, () => {})

app.put('/some-route/:id', {
schema: {
Expand All @@ -70,7 +70,7 @@ app.put('/some-route/:id', {
description: 'Find more info here'
},
}
}, (req, reply) => {})
}, () => {})

app.put('/image.png', {
schema: {
Expand Down Expand Up @@ -101,7 +101,7 @@ app.get('/public/route', {
links: {
200: { 'some-route': { operationId: 'opeId' } }
}
}, (req, reply) => {})
}, () => {})

app.get('/public/readonly-schema-route', {
schema: {
Expand All @@ -114,7 +114,7 @@ app.get('/public/readonly-schema-route', {
links: {
200: { 'some-route': { operationId: 'opeId' } }
}
} as const, (req, reply) => {})
} as const, () => {})

app
.register(fastifySwagger, {
Expand Down

0 comments on commit efb3922

Please # to comment.