runTest() — vite Function Reference
Architecture documentation for the runTest() function in test-network-imports.js from the vite codebase.
Entity Profile
Dependency Diagram
graph TD b12499b6_ab55_138b_cab5_b6b93e9f9faa["runTest()"] 1b768d4e_1046_6959_4001_0bf9a409e4ef["test-network-imports.js"] b12499b6_ab55_138b_cab5_b6b93e9f9faa -->|defined in| 1b768d4e_1046_6959_4001_0bf9a409e4ef style b12499b6_ab55_138b_cab5_b6b93e9f9faa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
playground/ssr-html/test-network-imports.js lines 5–25
async function runTest(userRunner) {
const server = await createServer({
configFile: false,
root: fileURLToPath(new URL('.', import.meta.url)),
server: {
middlewareMode: true,
ws: false,
},
})
let mod
if (userRunner) {
const runner = await createServerModuleRunner(server.environments.ssr, {
hmr: false,
})
mod = await runner.import('/src/network-imports.js')
} else {
mod = await server.ssrLoadModule('/src/network-imports.js')
}
assert.equal(mod.slash('foo\\bar'), 'foo/bar')
await server.close()
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does runTest() do?
runTest() is a function in the vite codebase, defined in playground/ssr-html/test-network-imports.js.
Where is runTest() defined?
runTest() is defined in playground/ssr-html/test-network-imports.js at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free