Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove unused params #847

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading