From 2052bdb1ebabf1ff862dfb7e6efa1944269a4d4d Mon Sep 17 00:00:00 2001 From: saltyaom Date: Thu, 16 Nov 2023 19:43:06 +0700 Subject: [PATCH] :broom: chore: dereference t.Ref --- CHANGELOG.md | 7 +++++++ test/units/map-early-response.test.ts | 12 ++++-------- test/units/map-response.test.ts | 12 ++++-------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 875e2f7f..29cc319b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 0.7.28 - 16 Nov 2023 +Chore: +- Update `cookie` to `0.6.0` + +Bug fix: +- [#314](https://github.com/elysiajs/elysia/pull/314) Unable to dereference schema with 'undefined' when using t.Ref + # 0.7.27 - 16 Nov 2023 Bug fix: - [#312](https://github.com/elysiajs/elysia/issues/312) default params type suggestion for WebSocket diff --git a/test/units/map-early-response.test.ts b/test/units/map-early-response.test.ts index ccabc4a1..f2082971 100644 --- a/test/units/map-early-response.test.ts +++ b/test/units/map-early-response.test.ts @@ -249,10 +249,8 @@ describe('Map Early Response', () => { }) expect(response).toBeInstanceOf(Response) expect(await response?.text()).toEqual('Hina') - expect(response?.headers.toJSON()).toEqual({ - name: 'Sorasaki Hina', - 'set-cookie': ['name=hina'] - }) + expect(response?.headers.get('name')).toEqual('Sorasaki Hina') + expect(response?.headers.getAll('set-cookie')).toEqual(['name=hina']) }) it('set multiple cookie', async () => { @@ -272,10 +270,8 @@ describe('Map Early Response', () => { }) expect(response).toBeInstanceOf(Response) expect(await response?.text()).toEqual('Hina') - expect(response?.headers.toJSON()).toEqual({ - name: 'Sorasaki Hina', - 'set-cookie': ["name=hina", "affiliation=gehenna"] - }) + expect(response?.headers.get('name')).toEqual('Sorasaki Hina') + expect(response?.headers.getAll('set-cookie')).toEqual(['name=hina', 'affiliation=gehenna']) }) it('map Passthrough', async () => { diff --git a/test/units/map-response.test.ts b/test/units/map-response.test.ts index 087cd87d..6e2a4340 100644 --- a/test/units/map-response.test.ts +++ b/test/units/map-response.test.ts @@ -278,10 +278,8 @@ describe('Map Response', () => { }) expect(response).toBeInstanceOf(Response) expect(await response.text()).toEqual('Hina') - expect(response.headers.toJSON()).toEqual({ - name: 'Sorasaki Hina', - 'set-cookie': ['name=hina'] - }) + expect(response.headers.get('name')).toEqual('Sorasaki Hina') + expect(response.headers.getAll('set-cookie')).toEqual(['name=hina']) }) it('set multiple cookie', async () => { @@ -301,10 +299,8 @@ describe('Map Response', () => { }) expect(response).toBeInstanceOf(Response) expect(await response.text()).toEqual('Hina') - expect(response.headers.toJSON()).toEqual({ - name: 'Sorasaki Hina', - 'set-cookie': ['name=hina', 'affiliation=gehenna'] - }) + expect(response.headers.get('name')).toEqual('Sorasaki Hina') + expect(response.headers.getAll('set-cookie')).toEqual(['name=hina', 'affiliation=gehenna']) }) it('map Passthrough', async () => {