Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Jan 12, 2024
1 parent 2f91107 commit acf2a05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/cookie.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ test('should set multiple cookies (an array already exists)', (t) => {
reply
.header('Set-Cookie', ['bar=bar'])
.setCookie('foo', 'foo', { path: '/' })
.setCookie('foo', 'foo', { path: '/path' })
.send({ hello: 'world' })
})

Expand All @@ -153,14 +154,14 @@ test('should set multiple cookies (an array already exists)', (t) => {
t.same(JSON.parse(res.body), { hello: 'world' })

const cookies = res.cookies
t.equal(cookies.length, 2)
t.equal(cookies.length, 3)
t.equal(cookies[0].name, 'bar')
t.equal(cookies[0].value, 'bar')
t.equal(cookies[0].path, undefined)

t.equal(cookies[1].name, 'foo')
t.equal(cookies[1].value, 'foo')
t.equal(cookies[1].path, '/')
t.equal(cookies[2].path, '/path')
})
})

Expand Down

0 comments on commit acf2a05

Please sign in to comment.