MCPcopy Create free account
hub / github.com/fastify/fastify / onClose

Function onClose

test/close.test.js:15–21  ·  view source on GitHub ↗
(instance, done)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

doneFunction · 0.50

Tested by

no test coverage detected