chore(zod-openapi): format code and fixed the type (#827)
parent
72e7070acd
commit
b0320d91f0
Binary file not shown.
|
@ -265,7 +265,7 @@ describe('Middleware', () => {
|
|||
})
|
||||
|
||||
it('Should infer Env from router middleware', async () => {
|
||||
const app = new OpenAPIHono<{Variables: { too: Symbol }}>()
|
||||
const app = new OpenAPIHono<{ Variables: { too: Symbol } }>()
|
||||
app.openapi(
|
||||
createRoute({
|
||||
method: 'get',
|
||||
|
@ -305,7 +305,7 @@ describe('Middleware', () => {
|
|||
})
|
||||
|
||||
it('Should infer Env root when no middleware provided', async () => {
|
||||
const app = new OpenAPIHono<{Variables: { too: Symbol }}>()
|
||||
const app = new OpenAPIHono<{ Variables: { too: Symbol } }>()
|
||||
app.openapi(
|
||||
createRoute({
|
||||
method: 'get',
|
||||
|
|
|
@ -1602,7 +1602,7 @@ describe('Named params in nested routes', () => {
|
|||
it('Should return a correct path', async () => {
|
||||
const res = await root.request('/doc')
|
||||
expect(res.status).toBe(200)
|
||||
const data = await res.json()
|
||||
const data = (await res.json()) as { paths: string[] }
|
||||
expect(Object.keys(data['paths'])[0]).toBe('/root/{rootId}/sub/{subId}')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue