parse.spec.ts — vite Source File
Architecture documentation for parse.spec.ts, a typescript file in the vite codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c11accd6_8ec6_52c6_b2af_25876f356f31["parse.spec.ts"] b68d9c02_4026_8cfa_8eb1_35ec4a8f23cb["importMetaGlob.ts"] c11accd6_8ec6_52c6_b2af_25876f356f31 --> b68d9c02_4026_8cfa_8eb1_35ec4a8f23cb e4ded9fb_6262_73a6_ae73_068c08e2b994["parseImportGlob"] c11accd6_8ec6_52c6_b2af_25876f356f31 --> e4ded9fb_6262_73a6_ae73_068c08e2b994 a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"] c11accd6_8ec6_52c6_b2af_25876f356f31 --> a340ba46_b2b7_3048_3bb3_6907a74c8464 style c11accd6_8ec6_52c6_b2af_25876f356f31 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe, expect, it } from 'vitest'
import { parseImportGlob } from '../../../plugins/importMetaGlob'
async function run(input: string) {
const items = await parseImportGlob(
input,
process.cwd(),
process.cwd(),
(id) => id,
)
return items.map((i) => ({
globs: i.globs,
options: i.options,
start: i.start,
}))
}
async function runError(input: string) {
try {
await run(input)
} catch (e) {
return e
}
}
describe('parse positives', async () => {
it('basic', async () => {
expect(
await run(`
import.meta.glob('./modules/*.ts')
`),
).toMatchInlineSnapshot(`
[
{
"globs": [
"./modules/*.ts",
],
"options": {},
"start": 5,
},
]
`)
})
it('array', async () => {
expect(
await run(`
import.meta.glob(['./modules/*.ts', './dir/*.{js,ts}'])
`),
).toMatchInlineSnapshot(`
[
{
"globs": [
"./modules/*.ts",
"./dir/*.{js,ts}",
],
"options": {},
"start": 5,
},
]
// ... (358 more lines)
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does parse.spec.ts do?
parse.spec.ts is a source file in the vite codebase, written in typescript. It belongs to the ViteCore domain, ConfigEngine subdomain.
What functions are defined in parse.spec.ts?
parse.spec.ts defines 2 function(s): run, runError.
What does parse.spec.ts depend on?
parse.spec.ts imports 3 module(s): importMetaGlob.ts, parseImportGlob, vitest.
Where is parse.spec.ts in the architecture?
parse.spec.ts is located at packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts (domain: ViteCore, subdomain: ConfigEngine, directory: packages/vite/src/node/__tests__/plugins/importGlob).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free