Skip to content

Commit

Permalink
🧹 chore: dereference t.Ref
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyAom committed Nov 16, 2023
1 parent b50df58 commit 2052bdb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 4 additions & 8 deletions test/units/map-early-response.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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 () => {
Expand Down
12 changes: 4 additions & 8 deletions test/units/map-response.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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 () => {
Expand Down

0 comments on commit 2052bdb

Please sign in to comment.