(name, handler)
| 16 | const fastify = Fastify() |
| 17 | |
| 18 | function subscribe (name, handler) { |
| 19 | const wrapped = (msg) => { |
| 20 | if (msg.request.server === fastify) handler(msg) |
| 21 | } |
| 22 | diagnostics.subscribe(name, wrapped) |
| 23 | t.after(() => diagnostics.unsubscribe(name, wrapped)) |
| 24 | } |
| 25 | |
| 26 | subscribe('tracing:fastify.request.handler:start', (msg) => { |
| 27 | t.assert.strictEqual(callOrder++, 0) |
no test coverage detected