optimize-deps.spec.ts — vite Source File
Architecture documentation for optimize-deps.spec.ts, a typescript file in the vite codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 05aeade8_27e4_999d_169d_67ceb2cc122e["optimize-deps.spec.ts"] a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"] 05aeade8_27e4_999d_169d_67ceb2cc122e --> a340ba46_b2b7_3048_3bb3_6907a74c8464 d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"] 05aeade8_27e4_999d_169d_67ceb2cc122e --> d3fd5575_295b_d6be_24dd_62d277645dc9 style 05aeade8_27e4_999d_169d_67ceb2cc122e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe, expect, test } from 'vitest'
import {
browserErrors,
browserLogs,
getColor,
isBuild,
isServe,
page,
readDepOptimizationMetadata,
serverLogs,
viteTestUrl,
} from '~utils'
test('default + named imports from cjs dep (react)', async () => {
await expect.poll(() => page.textContent('.cjs button')).toBe('count is 0')
await page.click('.cjs button')
await expect.poll(() => page.textContent('.cjs button')).toBe('count is 1')
})
test('named imports from webpacked cjs (phoenix)', async () => {
await expect.poll(() => page.textContent('.cjs-phoenix')).toBe('ok')
})
test('default import from webpacked cjs (clipboard)', async () => {
await expect.poll(() => page.textContent('.cjs-clipboard')).toBe('ok')
})
test('default import from cjs with es-module-flag (dep-cjs-with-es-module-flag)', async () => {
await expect
.poll(() => page.textContent('.cjs-with-es-module-flag'))
.toBe('ok')
})
test('default import from cjs (cjs-dep-cjs-compiled-from-esm)', async () => {
await expect
.poll(() => page.textContent('.cjs-dep-cjs-compiled-from-esm'))
.toBe('ok')
})
test('default import from cjs (cjs-dep-cjs-compiled-from-cjs)', async () => {
await expect
.poll(() => page.textContent('.cjs-dep-cjs-compiled-from-cjs'))
.toBe('ok')
})
test('dynamic imports from cjs dep (react)', async () => {
await expect
.poll(() => page.textContent('.cjs-dynamic button'))
.toBe('count is 0')
await page.click('.cjs-dynamic button')
await expect
.poll(() => page.textContent('.cjs-dynamic button'))
.toBe('count is 1')
})
test('dynamic named imports from webpacked cjs (phoenix)', async () => {
await expect.poll(() => page.textContent('.cjs-dynamic-phoenix')).toBe('ok')
})
test('dynamic default import from webpacked cjs (clipboard)', async () => {
// ... (343 more lines)
Dependencies
- vitest
- ~utils
Source
Frequently Asked Questions
What does optimize-deps.spec.ts do?
optimize-deps.spec.ts is a source file in the vite codebase, written in typescript.
What does optimize-deps.spec.ts depend on?
optimize-deps.spec.ts imports 2 module(s): vitest, ~utils.
Where is optimize-deps.spec.ts in the architecture?
optimize-deps.spec.ts is located at playground/optimize-deps/__tests__/optimize-deps.spec.ts (directory: playground/optimize-deps/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free