Skip to content

Commit

Permalink
test(zod-openapi): add content-type to avoid errors (#257)
Browse files Browse the repository at this point in the history
* changeset

* test(zod-openapi): add content-type to avoid error
  • Loading branch information
yusukebe authored Nov 15, 2023
1 parent 129f468 commit eb3694c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/zod-openapi/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ describe('Header', () => {
expect(res.status).toBe(200)
expect(await res.json()).toEqual({
'x-request-id': '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b',
'authorization': 'Bearer helloworld',
authorization: 'Bearer helloworld',
})
})

Expand Down Expand Up @@ -925,6 +925,9 @@ describe('With hc', () => {
const res = await app.request('/posts', {
method: 'POST',
body: JSON.stringify({ bad: 'property' }),
headers: {
'Content-Type': 'application/json',
},
})
expect(res.status).toBe(400)
expect(await res.json()).toEqual({
Expand All @@ -937,6 +940,9 @@ describe('With hc', () => {
const res = await app.request('/books', {
method: 'POST',
body: JSON.stringify({ bad: 'property' }),
headers: {
'Content-Type': 'application/json',
},
})
expect(res.status).toBe(400)
expect(await res.json()).toEqual({
Expand Down

0 comments on commit eb3694c

Please sign in to comment.