chore(zod-openapi): format code and fixed the type (#827)

pull/822/merge
Yusuke Wada 2024-11-14 16:52:38 +09:00 committed by GitHub
parent 72e7070acd
commit b0320d91f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -265,7 +265,7 @@ describe('Middleware', () => {
}) })
it('Should infer Env from router middleware', async () => { it('Should infer Env from router middleware', async () => {
const app = new OpenAPIHono<{Variables: { too: Symbol }}>() const app = new OpenAPIHono<{ Variables: { too: Symbol } }>()
app.openapi( app.openapi(
createRoute({ createRoute({
method: 'get', method: 'get',
@ -305,7 +305,7 @@ describe('Middleware', () => {
}) })
it('Should infer Env root when no middleware provided', async () => { 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( app.openapi(
createRoute({ createRoute({
method: 'get', method: 'get',

View File

@ -1602,7 +1602,7 @@ describe('Named params in nested routes', () => {
it('Should return a correct path', async () => { it('Should return a correct path', async () => {
const res = await root.request('/doc') const res = await root.request('/doc')
expect(res.status).toBe(200) 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}') expect(Object.keys(data['paths'])[0]).toBe('/root/{rootId}/sub/{subId}')
}) })
}) })