runTests() — fastify Function Reference
Architecture documentation for the runTests() function in decorator.test.js from the fastify codebase.
Entity Profile
Dependency Diagram
graph TD 3f5125e9_8f34_5b93_dee8_efc37e36404b["runTests()"] f9fc2cf9_e568_0090_21d4_c4527e6f76be["decorator.test.js"] 3f5125e9_8f34_5b93_dee8_efc37e36404b -->|defined in| f9fc2cf9_e568_0090_21d4_c4527e6f76be style 3f5125e9_8f34_5b93_dee8_efc37e36404b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
test/decorator.test.js lines 120–134
const runTests = async (t, fastifyServer) => {
const endpoints = [
{ path: '/yes', expectedBody: { hello: 'world' } },
{ path: '/no', expectedBody: { hello: 'world' } }
]
for (const { path, expectedBody } of endpoints) {
const result = await fetch(`${fastifyServer}${path}`)
t.assert.ok(result.ok)
t.assert.strictEqual(result.status, 200)
const body = await result.text()
t.assert.strictEqual(result.headers.get('content-length'), '' + body.length)
t.assert.deepStrictEqual(JSON.parse(body), expectedBody)
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does runTests() do?
runTests() is a function in the fastify codebase, defined in test/decorator.test.js.
Where is runTests() defined?
runTests() is defined in test/decorator.test.js at line 120.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free