worker-iife.spec.ts — vite Source File
Architecture documentation for worker-iife.spec.ts, a typescript file in the vite codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c91af51d_f280_c1ab_e206_ba11e0457427["worker-iife.spec.ts"] e6032fbc_44cf_58d6_868d_dd15106c18c5["node:fs"] c91af51d_f280_c1ab_e206_ba11e0457427 --> e6032fbc_44cf_58d6_868d_dd15106c18c5 51e96894_3556_ed5c_1ede_97d449867adf["node:path"] c91af51d_f280_c1ab_e206_ba11e0457427 --> 51e96894_3556_ed5c_1ede_97d449867adf a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"] c91af51d_f280_c1ab_e206_ba11e0457427 --> a340ba46_b2b7_3048_3bb3_6907a74c8464 d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"] c91af51d_f280_c1ab_e206_ba11e0457427 --> d3fd5575_295b_d6be_24dd_62d277645dc9 style c91af51d_f280_c1ab_e206_ba11e0457427 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import fs from 'node:fs'
import path from 'node:path'
import { describe, expect, test } from 'vitest'
import {
extractSourcemap,
formatSourcemapForSnapshot,
isBuild,
isServe,
page,
readManifest,
testDir,
viteTestUrl,
} from '~utils'
test('normal', async () => {
await expect.poll(() => page.textContent('.pong')).toMatch('pong')
await expect
.poll(() => page.textContent('.mode'))
.toMatch(process.env.NODE_ENV)
await expect
.poll(() => page.textContent('.bundle-with-plugin'))
.toMatch('worker bundle with plugin success!')
await expect
.poll(() => page.textContent('.asset-url'))
.toMatch(
isBuild
? /\/iife\/assets\/worker_asset-vite-[\w-]{8}\.svg/
: '/iife/vite.svg',
)
})
test('named', async () => {
await expect
.poll(() => page.textContent('.pong-named'))
.toMatch('namedWorker')
})
test('TS output', async () => {
await expect.poll(() => page.textContent('.pong-ts-output')).toMatch('pong')
})
test('inlined', async () => {
await expect.poll(() => page.textContent('.pong-inline')).toMatch('pong')
})
test('named inlined', async () => {
await expect
.poll(() => page.textContent('.pong-inline-named'))
.toMatch('namedInlineWorker')
})
test('shared worker', async () => {
await expect.poll(() => page.textContent('.tick-count')).toMatch('pong')
})
test('named shared worker', async () => {
await expect.poll(() => page.textContent('.tick-count-named')).toMatch('pong')
})
test('inline shared worker', async () => {
// ... (144 more lines)
Dependencies
- node:fs
- node:path
- vitest
- ~utils
Source
Frequently Asked Questions
What does worker-iife.spec.ts do?
worker-iife.spec.ts is a source file in the vite codebase, written in typescript.
What does worker-iife.spec.ts depend on?
worker-iife.spec.ts imports 4 module(s): node:fs, node:path, vitest, ~utils.
Where is worker-iife.spec.ts in the architecture?
worker-iife.spec.ts is located at playground/worker/__tests__/iife/worker-iife.spec.ts (directory: playground/worker/__tests__/iife).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free