(instance, opts, next)
| 197 | } |
| 198 | |
| 199 | const fooInstance = function (instance, opts, next) { |
| 200 | instance.register(bazInstance, { prefix: 'baz' }) |
| 201 | instance.register(barInstance, { prefix: 'bar' }) |
| 202 | |
| 203 | instance.setGenReqId(function (req) { |
| 204 | return 'foo' |
| 205 | }) |
| 206 | |
| 207 | instance.get('/', (req, reply) => { |
| 208 | t.assert.ok(req.id) |
| 209 | reply.send({ id: req.id }) |
| 210 | }) |
| 211 | next() |
| 212 | } |
| 213 | |
| 214 | fastify.register(fooInstance, { prefix: 'foo' }) |
| 215 |
nothing calls this directly
no test coverage detected