Skip to content

Commit

Permalink
rm unnecessary json.stringify from test
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi12299 committed Sep 30, 2024
1 parent a294091 commit 6dcc952
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/cookies/test/response-cookies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,7 @@ test('splitting multiple set-cookie', () => {
test('cookie with special chars', () => {
const headers = new Headers()
const specialChars = 'bar 50%!@#$%^&*()_+'
headers.set(
'set-cookie',
`foo=${JSON.stringify({ 'val': encodeURIComponent(specialChars) })}`,
)
headers.set('set-cookie', `foo=${encodeURIComponent(specialChars)}`)
const cookies = new ResponseCookies(headers)
expect(cookies.getAll()).toEqual([
{ name: 'foo', value: `{"val":"${specialChars}"}` },
])
expect(cookies.getAll()).toEqual([{ name: 'foo', value: specialChars }])
})

0 comments on commit 6dcc952

Please sign in to comment.