test(zod-openapi): add content-type to avoid errors (#257)

* changeset

* test(zod-openapi): add content-type to avoid error
pull/256/head
Yusuke Wada 2023-11-16 06:33:29 +09:00 committed by GitHub
parent 129f4680a2
commit eb3694cd2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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',
})
})
@ -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({
@ -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({