Skip to content

Commit

Permalink
test: prepare plugin for fastify 4.x (#156)
Browse files Browse the repository at this point in the history
* fix (test): remove `preParsing` reference

* refactor (test): apply @jsumners review suggestion
  • Loading branch information
darkgl0w committed Dec 3, 2021
1 parent affe7bb commit 7990c00
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions test/cookie.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ test('expires should not be overridden in clearCookie', (t) => {
})

test('parses incoming cookies', (t) => {
t.plan(6 + 3 * 3)
t.plan(12)
const fastify = Fastify()
fastify.register(plugin)

Expand All @@ -216,13 +216,6 @@ test('parses incoming cookies', (t) => {
})
}

fastify.addHook('preParsing', (req, reply, payload, done) => {
t.ok(req.cookies)
t.ok(req.cookies.bar)
t.equal(req.cookies.bar, 'bar')
done()
})

fastify.get('/test2', (req, reply) => {
t.ok(req.cookies)
t.ok(req.cookies.bar)
Expand Down

0 comments on commit 7990c00

Please sign in to comment.