(instance, done)
| 13 | const fastify = Fastify() |
| 14 | fastify.addHook('onClose', onClose) |
| 15 | function onClose (instance, done) { |
| 16 | t.assert.ok(typeof fastify === typeof this) |
| 17 | t.assert.ok(typeof fastify === typeof instance) |
| 18 | t.assert.strictEqual(fastify, this) |
| 19 | t.assert.strictEqual(fastify, instance) |
| 20 | done() |
| 21 | } |
| 22 | |
| 23 | fastify.listen({ port: 0 }, err => { |
| 24 | t.assert.ifError(err) |