legacy.spec.ts — vite Source File
Architecture documentation for legacy.spec.ts, a typescript file in the vite codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 9d542aaf_8e81_53bf_1cc3_3c8d6c0e9740["legacy.spec.ts"] a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"] 9d542aaf_8e81_53bf_1cc3_3c8d6c0e9740 --> a340ba46_b2b7_3048_3bb3_6907a74c8464 d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"] 9d542aaf_8e81_53bf_1cc3_3c8d6c0e9740 --> d3fd5575_295b_d6be_24dd_62d277645dc9 style 9d542aaf_8e81_53bf_1cc3_3c8d6c0e9740 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe, expect, test } from 'vitest'
import {
findAssetFile,
getColor,
isBuild,
listAssets,
page,
readFile,
readManifest,
} from '~utils'
test('should load the worker', async () => {
await expect.poll(() => page.textContent('.worker-message')).toMatch('module')
})
test('should work', async () => {
await expect.poll(() => page.textContent('#app')).toMatch('Hello')
})
test('import.meta.env.LEGACY', async () => {
await expect
.poll(() => page.textContent('#env'))
.toMatch(isBuild ? 'true' : 'false')
await expect.poll(() => page.textContent('#env-equal')).toMatch('true')
})
// https://github.com/vitejs/vite/issues/3400
test('transpiles down iterators correctly', async () => {
await expect.poll(() => page.textContent('#iterators')).toMatch('hello')
})
test('async generator', async () => {
await expect
.poll(() => page.textContent('#async-generator'))
.toMatch('[0,1,2]')
})
test('wraps with iife', async () => {
await expect
.poll(() => page.textContent('#babel-helpers'))
.toMatch('exposed babel helpers: false')
})
test('generates assets', async () => {
await expect
.poll(() => page.textContent('#assets'))
.toMatch(
isBuild
? [
'index: text/html',
'index-legacy: text/html',
'chunk-async: text/html',
'chunk-async-legacy: text/html',
'immutable-chunk: text/javascript',
'immutable-chunk-legacy: text/javascript',
'polyfills-legacy: text/html',
].join('\n')
: [
'index: text/html',
'index-legacy: text/html',
// ... (116 more lines)
Dependencies
- vitest
- ~utils
Source
Frequently Asked Questions
What does legacy.spec.ts do?
legacy.spec.ts is a source file in the vite codebase, written in typescript.
What does legacy.spec.ts depend on?
legacy.spec.ts imports 2 module(s): vitest, ~utils.
Where is legacy.spec.ts in the architecture?
legacy.spec.ts is located at playground/legacy/__tests__/legacy.spec.ts (directory: playground/legacy/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free