MCPcopy
hub / github.com/fastify/fastify / checkId

Function checkId

test/internals/logger.test.js:35–46  ·  view source on GitHub ↗
(done)

Source from the content-addressed store, hash-verified

33 })
34
35 function checkId (done) {
36 fastify.inject({
37 method: 'GET',
38 url: 'http://localhost:' + fastify.server.address().port
39 }, (err, res) => {
40 t.assert.ifError(err)
41 const payload = JSON.parse(res.payload)
42 t.assert.ok(ids.indexOf(payload.id) === -1, 'the id should not be duplicated')
43 ids.push(payload.id)
44 done()
45 })
46 }
47})
48
49test('The logger should not reuse request id header for req.id', (t, done) => {

Callers

nothing calls this directly

Calls 2

injectMethod · 0.80
doneFunction · 0.70

Tested by

no test coverage detected