cli-module.spec.ts — vite Source File
Architecture documentation for cli-module.spec.ts, a typescript file in the vite codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 969881f2_5b11_837d_716a_e199f79f88d1["cli-module.spec.ts"] f7b3d158_cef2_c5d6_e1e9_618c0b12e5a8["serve.ts"] 969881f2_5b11_837d_716a_e199f79f88d1 --> f7b3d158_cef2_c5d6_e1e9_618c0b12e5a8 a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"] 969881f2_5b11_837d_716a_e199f79f88d1 --> a340ba46_b2b7_3048_3bb3_6907a74c8464 d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"] 969881f2_5b11_837d_716a_e199f79f88d1 --> d3fd5575_295b_d6be_24dd_62d277645dc9 style 969881f2_5b11_837d_716a_e199f79f88d1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { expect, test } from 'vitest'
import { port } from './serve'
import { page } from '~utils'
test('cli should work in "type":"module" package', async () => {
// this test uses a custom serve implementation, so regular helpers for browserLogs and goto don't work
// do the same thing manually
const logs = []
const onConsole = (msg) => {
logs.push(msg.text())
}
try {
page.on('console', onConsole)
await page.goto(`http://localhost:${port}/`)
expect(await page.textContent('.app')).toBe(
'vite cli in "type":"module" package works!',
)
expect(
logs.some((msg) =>
msg.match('vite cli in "type":"module" package works!'),
),
).toBe(true)
} finally {
page.off('console', onConsole)
}
})
Domain
Dependencies
- serve.ts
- vitest
- ~utils
Source
Frequently Asked Questions
What does cli-module.spec.ts do?
cli-module.spec.ts is a source file in the vite codebase, written in typescript. It belongs to the ViteCore domain.
What does cli-module.spec.ts depend on?
cli-module.spec.ts imports 3 module(s): serve.ts, vitest, ~utils.
Where is cli-module.spec.ts in the architecture?
cli-module.spec.ts is located at playground/cli-module/__tests__/cli-module.spec.ts (domain: ViteCore, directory: playground/cli-module/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free