From eb3694cd2c572365193579e8c1632a8df321d027 Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Thu, 16 Nov 2023 06:33:29 +0900 Subject: [PATCH] test(zod-openapi): add content-type to avoid errors (#257) * changeset * test(zod-openapi): add content-type to avoid error --- packages/zod-openapi/test/index.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/zod-openapi/test/index.test.ts b/packages/zod-openapi/test/index.test.ts index b8ed6262..48de0cb5 100644 --- a/packages/zod-openapi/test/index.test.ts +++ b/packages/zod-openapi/test/index.test.ts @@ -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({