Next generation testing framework powered by Vite.
This report summarizes scanner evidence for vitest-dev/vitest, a TypeScript project with 17,313 GitHub stars. SynthScan examined 281,284 lines of code across 1942 source files, recording 178 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 1.0 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 156 finding(s).
Are imports declared and package/API names verified? 22 finding(s).
Are wrappers, guards, and repeated structures necessary? 117 finding(s).
Which changes need focused human review? 178 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 178 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/ui/test/trace.spec.ts | 424 | async function testMultipleMatchHighlight(page: Page) { | CODE |
| LOW | test/ui/test/trace.spec.ts | 579 | async function testPersistsSelectionInURL(page: Page) { | CODE |
| LOW | test/ui/test/trace.spec.ts | 757 | async function testPersistsResizedTracePanes(page: Page) { | CODE |
| LOW | test/ui/test/ui.spec.ts | 802 | async function testFilterInitiallyInvisibleItem(page: Page) { | CODE |
| LOW | …t/test/uncovered-concurrent-transform.istanbul.test.ts | 50 | function transformAnotherFileDuringUncoveredTransform(): Plugin { | CODE |
| LOW | test/coverage-test/test/clean-on-rerun.test.ts | 139 | async function getFunctionCoverageCounts(file: 'math.ts' | 'even.ts') { | CODE |
| LOW | test/unit/test/snapshots-outside.ts | 3 | export function testOutsideInlineSnapshot() { | CODE |
| LOW | test/browser/specs/optimized-chunks-cache.test.ts | 8 | function recordDependencyResponses() { | CODE |
| LOW | test/browser/specs/heartbeat.test.ts | 6 | function findDescendantBrowserProcesses(): number[] { | CODE |
| LOW | test/e2e/test/module-diagnostic.test.ts | 14 | async function getSourceModuleDiagnostic( | CODE |
| LOW | test/e2e/test/module-diagnostic.test.ts | 65 | function normalizeUntrackedModules( | CODE |
| LOW | test/e2e/test/no-module-runner.test.ts | 957 | function runNoViteModuleRunnerTests( | CODE |
| LOW | test/e2e/test/config/browser-configs.test.ts | 76 | async function observePreTransformRequests(options: TestUserConfig = {}) { | CODE |
| LOW | test/e2e/test/reporters/import-durations.test.ts | 10 | function normalizeImportDurationsOutput(stdout: string): string { | CODE |
| LOW | docs/api/vi.md | 1022 | function advanceTimersToNextTimerAsync(): Promise<Vitest> | CODE |
| LOW | docs/api/vi.md | 1162 | function runOnlyPendingTimersAsync(): Promise<Vitest> | CODE |
| LOW | docs/api/advanced/vitest.md | 54 | function getTestSpecificationResult( | CODE |
| LOW | docs/api/advanced/vitest.md | 198 | function getRelevantTestSpecifications( | CODE |
| LOW | docs/api/advanced/vitest.md | 397 | function resetGlobalTestNamePattern(): void | CODE |
| LOW | docs/api/advanced/vitest.md | 523 | function onFilterWatchedSpecification( | CODE |
| LOW | docs/api/browser/assertions.md | 383 | function toHaveAccessibleDescription(description?: string | RegExp): Promise<void> | CODE |
| LOW | docs/api/browser/assertions.md | 436 | function toHaveAccessibleErrorMessage(message?: string | RegExp): Promise<void> | CODE |
| LOW | packages/spy/src/index.ts | 737 | function copyOriginalStaticProperties( | CODE |
| LOW | packages/ui/client/composables/module-graph.ts | 15 | function defineExternalModuleNodes(modules: string[]): ModuleNode[] { | CODE |
| LOW | packages/ui/client/composables/trace-view.ts | 124 | export function getTraceEditorMarkersForFile( | CODE |
| LOW | packages/ui/client/composables/client/static.ts | 25 | function deserializeReportMetadata(metadata: HTMLReportMetadata) { | CODE |
| LOW | packages/ui/client/components/DetailsHeaderButtons.vue | 11 | function getDetailsPanelToggleRotation(action: 'show' | 'hide') { | CODE |
| LOW | packages/coverage-v8/src/provider.ts | 532 | function findLongestFunctionLength(functions: Profiler.FunctionCoverage[]) { | CODE |
| LOW | …kages/vitest/src/runtime/benchmark/default-provider.ts | 14 | export function createDefaultBenchmarkProvider(config: SerializedConfig): BenchmarkProvider { | CODE |
| LOW | packages/vitest/src/runtime/runner/hooks.ts | 35 | export function getBeforeHookCleanupCallback( | CODE |
| LOW | packages/vitest/src/runtime/runner/run.ts | 263 | function makeAroundHookTimeoutError( | CODE |
| LOW | packages/vitest/src/runtime/runner/run.ts | 848 | function markPendingTasksAsSkipped(suite: Suite, runner: VitestRunner, note?: string) { | CODE |
| LOW | packages/vitest/src/runtime/vm/esm-executor.ts | 75 | async function staticImportModuleDynamically( | CODE |
| LOW | packages/vitest/src/runtime/vm/esm-executor.ts | 82 | function staticInitializeImportMeta(meta: ImportMeta, mod: VMModule): void { | CODE |
| LOW | packages/vitest/src/runtime/vm/utils.ts | 82 | export function createRequireAsyncModuleError(identifier: string, detail: string): Error { | CODE |
| LOW | packages/vitest/src/runtime/vm/utils.ts | 90 | export function createConcurrentRequireError(identifier: string): Error { | CODE |
| LOW | packages/vitest/src/runtime/vm/utils.ts | 114 | export async function activeImportModuleDynamically( | CODE |
| LOW | …ges/vitest/src/runtime/moduleRunner/moduleEvaluator.ts | 632 | function enhanceMissingCjsGlobalsError(error: unknown): unknown { | CODE |
| LOW | packages/vitest/src/utils/coverage.ts | 4 | export function getCoverageFilesDirectory( | CODE |
| LOW | packages/vitest/src/utils/coverage.ts | 53 | export async function resolveCoverageProviderModule( | CODE |
| LOW | packages/vitest/src/utils/graph.ts | 29 | export function getSharedModuleGraphByProject( | CODE |
| LOW | packages/vitest/src/utils/graph.ts | 46 | function getSharedModuleGraphByEnvironment( | CODE |
| LOW | packages/vitest/src/utils/graph.ts | 72 | function findModuleGraphEnvironment( | CODE |
| LOW | packages/vitest/src/utils/graph.ts | 90 | function createModuleGraphCollector( | CODE |
| LOW | packages/vitest/src/integrations/coverage.ts | 5 | export async function startCoverageInsideWorker( | CODE |
| LOW | packages/vitest/src/integrations/snapshot/chai.ts | 200 | function toMatchDomainSnapshotImpl(opts: { | CODE |
| LOW | …ns/snapshot/environments/resolveSnapshotEnvironment.ts | 5 | export async function resolveSnapshotEnvironment( | CODE |
| LOW | packages/vitest/src/integrations/mock/when.ts | 389 | function getOrCreateBehavior(args: ScopedParameters) { | CODE |
| LOW | packages/vitest/src/typecheck/parse.ts | 53 | export async function getRawErrsMapFromTsCompile(tscErrorStdout: string): Promise<RawErrsMap> { | CODE |
| LOW | packages/vitest/src/node/module-diagnostic.ts | 20 | export function collectModuleDurationsDiagnostic( | CODE |
| LOW | packages/vitest/src/node/module-diagnostic.ts | 182 | export async function collectSourceModulesLocations( | CODE |
| LOW | packages/vitest/src/node/module-diagnostic.ts | 310 | function parseSourceImportsAndExports(source: string): Map<string, SourceStaticImport> { | CODE |
| LOW | packages/vitest/src/node/ast-collect.ts | 512 | export async function astCollectFileInformation( | CODE |
| LOW | packages/vitest/src/node/coverage.ts | 888 | function assertConfigurationModule(config: unknown): asserts config is { | CODE |
| LOW | packages/vitest/src/node/printError.ts | 323 | function handleImportOutsideModuleError(stack: string, logger: ErrorLogger) { | CODE |
| LOW | packages/vitest/src/node/printError.ts | 343 | function printModuleWarningForPackage(logger: ErrorLogger, path: string, name: string) { | CODE |
| LOW | packages/vitest/src/node/printError.ts | 369 | function printModuleWarningForSourceCode(logger: ErrorLogger, path: string) { | CODE |
| LOW | packages/vitest/src/node/pools/browser.ts | 785 | async function maybeCollectChromiumGarbage(project: TestProject, sessionId: string): Promise<void> { | CODE |
| LOW | …kages/vitest/src/node/pools/workers/typecheckWorker.ts | 181 | async function createWorkspaceTypechecker(project: TestProject, files: string[]) { | CODE |
| LOW | packages/vitest/src/node/config/resolveConfig.ts | 1299 | export function isExcludedByProjectFilter(projects: string[], name: string): boolean { | CODE |
| 57 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | test/unit/test/chainable.test.ts | 19 | expect(chain.b.a.b.a.b()).toEqual({ a: true, b: true }) | CODE |
| CRITICAL | test/unit/test/chainable.test.ts | 20 | expect(chain.a.a.a.a.a.a()).toEqual({ a: true }) | CODE |
| CRITICAL | test/e2e/test/vm-threads.test.ts | 894 | return [...project.vite.environments.ssr.moduleGraph.idToModuleMap.values()] | CODE |
| CRITICAL | test/e2e/test/vm-threads.test.ts | 957 | const prewarmed = [...project.vite.environments.ssr.moduleGraph.idToModuleMap.values()] | CODE |
| CRITICAL | packages/coverage-v8/src/provider.ts | 271 | node.init.object.object.name.startsWith('__vite_ssr_import_') | CODE |
| CRITICAL | packages/vitest/src/node/test-specification.ts | 101 | const task = this.project.vitest.state.idMap.get(this.taskId) | CODE |
| CRITICAL | packages/vitest/src/node/cache/fsModuleCache.ts | 430 | this.vitest.vite.config.logger.info(`fs cache was cleared because lockfile has changed`, { | CODE |
| CRITICAL | packages/mocker/src/node/resolver.ts | 62 | const resolved = await this.server.environments.client.pluginContainer.resolveId(id, importer) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/unit/test/pretty-format.test.ts | 1 | import { inspect as nodeInspect } from 'node:util' | COMMENT |
| LOW | test/unit/test/task-names.test.ts | 21 | // │ ├─ [0] saves recipe | COMMENT |
| LOW | test/unit/test/chai-style-assertions-sinon.test.ts | 161 | COMMENT | |
| LOW | test/unit/deps/dep1/esm/index.js | 1 | // esm/index.js was detected as isValidNodeImport(id) = false | COMMENT |
| LOW | test/test-utils/index.ts | 361 | // whichever state the poller's baseline captured, and any probe event (`add`, | COMMENT |
| LOW | test/browser/test/userEvent.test.ts | 801 | // TODO: support listbox | COMMENT |
| LOW | test/e2e/test/vm-threads.test.ts | 741 | COMMENT | |
| LOW | test/e2e/test/annotations.test.ts | 361 | 1..2 | COMMENT |
| LOW | test/e2e/test/concurrent.test.ts | 1 | import { expect, test } from 'vitest' | COMMENT |
| LOW | docs/guide/lifecycle.md | 221 | // aroundAll before | COMMENT |
| LOW | docs/guide/lifecycle.md | 301 | // outer aroundEach before | COMMENT |
| LOW | docs/.vitepress/config.ts | 721 | // text: '@vitest/plugin-eslint', | COMMENT |
| LOW | docs/.vitepress/config.ts | 1301 | // // TODO: generate | COMMENT |
| LOW | docs/.vitepress/config.ts | 1321 | // text: 'Assertion API', | COMMENT |
| LOW | docs/.vitepress/config.ts | 1341 | // }, | COMMENT |
| LOW | docs/.vitepress/config.ts | 1361 | // }, | COMMENT |
| LOW | examples/opentelemetry/docker-compose.yaml | 1 | services: | COMMENT |
| LOW | packages/ui/client/composables/client/index.ts | 221 | }, 1000) | COMMENT |
| LOW | packages/ui/client/composables/client/index.ts | 241 | // }, | COMMENT |
| LOW | packages/vitest/import-meta.d.ts | 1 | /// <reference path="./importMeta.d.ts" /> | COMMENT |
| LOW | packages/vitest/src/runtime/runner/suite.ts | 341 | const testOwnMeta = options.meta | COMMENT |
| LOW | packages/vitest/src/runtime/vm/commonjs-executor.ts | 441 | return module | COMMENT |
| LOW | packages/vitest/src/runtime/vm/commonjs-executor.ts | 461 | // const namedExports = new Set(exports) | COMMENT |
| LOW | packages/vitest/src/runtime/workers/vm.ts | 201 | ) | COMMENT |
| LOW | packages/vitest/src/node/pools/rpc.ts | 21 | } | COMMENT |
| LOW | packages/vitest/src/node/config/resolveConfig.ts | 1201 | if (rootConfig.ui && rootConfig.open) { | COMMENT |
| LOW | packages/vitest/src/node/reporters/base.ts | 1201 | // Module Self Total | COMMENT |
| LOW | packages/mocker/src/node/hoistMocks.ts | 321 | // return | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | _typos.toml | 23 | # Latin lorem ipsum | COMMENT |
| LOW | .claude/skills/typo-checker/SKILL.md | 62 | - Lorem ipsum text | CODE |
| LOW | docs/guide/browser/component-testing.md | 192 | await page.getByLabelText(/email/i).fill('user@example.com') | CODE |
| LOW | docs/guide/browser/component-testing.md | 195 | // component.setState({ email: 'user@example.com' }) | COMMENT |
| LOW | docs/guide/browser/component-testing.md | 276 | return HttpResponse.json({ id: params.id, name: 'John Doe', email: 'john@example.com' }) | CODE |
| LOW | docs/guide/browser/component-testing.md | 289 | await expect.element(getByText('John Doe')).toBeInTheDocument() | CODE |
| LOW | docs/guide/browser/component-testing.md | 358 | await nameInput.fill('John Doe') | CODE |
| LOW | docs/guide/browser/component-testing.md | 376 | name: 'John Doe', | CODE |
| LOW | docs/guide/browser/component-testing.md | 558 | await expect.element(page.getByText('John Doe')).toBeInTheDocument() | CODE |
| LOW | docs/guide/browser/aria-snapshots.md | 310 | <input aria-label="Email" placeholder="user@example.com" /> | CODE |
| LOW | docs/guide/recipes/conditional-mocking.md | 127 | .calledWith('admin@example.com') | CODE |
| LOW | docs/guide/recipes/conditional-mocking.md | 131 | Because the second registration is merged into the existing behavior, the `'admin'` action is not scoped to `'admin@exam | CODE |
| LOW | docs/guide/recipes/conditional-mocking.md | 143 | expect(getRole('user@example.com')).toBe('admin') | CODE |
| LOW | docs/guide/recipes/conditional-mocking.md | 144 | expect(getRole('user@example.com')).toBe('user') | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | CONTRIBUTING.md | 122 | Issues and pull requests entirely generated by AI with no human involvement (e.g. by an automated agent) will be labeled | CODE |
| HIGH | .github/workflows/issue-labeled.yml | 68 | Hello @${{ github.event.issue.user.login }}. Your issue has been labeled `maybe automated` because it appear | CODE |
| HIGH | .github/actions/send-ai-bot-comment/action.yml | 24 | Hello @${{ inputs.login }}. Your PR has been labeled `maybe automated` because it appears to have been fully g | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/e2e/test/cachedir-tag.test.ts | 49 | # This file is a cache directory tag created by Vitest. | COMMENT |
| MEDIUM | packages/vitest/src/node/cache/cachedirTag.ts | 9 | # This file is a cache directory tag created by Vitest. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/guide/mocking.md | 175 | Don't forget that this only [mocks _external_ access](/guide/mocking/modules#mocking-modules-pitfalls). In this example, | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/unit/test/chai-style-assertions-sinon.test.ts | 162 | // TODO: implement `thrown` | COMMENT |
| LOW | packages/expect/src/chai-style-assertions.ts | 72 | // TODO: implement | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/browser/docker-compose.yaml | 11 | # This setup employs simpler and robust `network_mode: host` instead of port mapping. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/browser/specs/bail-out.test.ts | 64 | "Cannot connect to the iframe. Did you change the location or submitted a form? If so, don't forget to call `event.p | CODE |
| LOW | packages/browser/src/client/orchestrator.ts | 362 | "If so, don't forget to call `event.preventDefault()` to avoid reloading the page.\n\n" + | CODE |