Skip to content

Commit

Permalink
chore(zod-openapi): format code and fixed the type (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Nov 14, 2024
1 parent 72e7070 commit b0320d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file modified packages/zod-openapi/.yarn/install-state.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/zod-openapi/test/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/zod-openapi/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
})
})
Expand Down

0 comments on commit b0320d9

Please sign in to comment.