(instance, opts, done)
| 25 | t.after(() => fastify.close()) |
| 26 | |
| 27 | function plugin (instance, opts, done) { |
| 28 | instance.decorateRequest(class="st">'check', null) |
| 29 | instance.addHook(class="st">'onRequest', (req, reply, done) => { |
| 30 | req.check = {} |
| 31 | done() |
| 32 | }) |
| 33 | setImmediate(done) |
| 34 | } |
| 35 | fastify.register(fp(plugin)) |
| 36 | |
| 37 | fastify.register((instance, options, done) => { |