MCPcopy
hub / github.com/fastify/fastify / serializerCompiler

Function serializerCompiler

test/internals/reply-serialize.test.js:605–617  ·  view source on GitHub ↗
({ schema, httpStatus, method, url })

Source from the content-addressed store, hash-verified

603 const schemaObj = getDefaultSchema()
604 const fastify = Fastify()
605 const serializerCompiler = ({ schema, httpStatus, method, url }) => {
606 t.assert.strictEqual(schema, schemaObj)
607 t.assert.ok(!httpStatus)
608 t.assert.strictEqual(method, 'GET')
609 t.assert.strictEqual(url, '/')
610
611 compilerCalled++
612 return input => {
613 t.assert.strictEqual(input, testInput)
614 serializerCalled++
615 return JSON.stringify(input)
616 }
617 }
618
619 t.plan(10)
620

Callers 1

reply.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected