Vercel Env Checker

Vitest jsdom environment preflight

Find DOM test environment gaps before Vitest throws.

Paste sanitized Vitest config, dependency names, and the relevant error. The checker reviews jsdom, happy-dom, setupFiles, globals, and per-file environment clues without running tests or reading source files.

Static config diffNo test executionSafe copy report

Vitest config

No source files
Do not paste private source files, secrets, stack traces with tokens, or full CI logs. This page checks static Vitest config fields only.
fail

Environment result

fail

The pasted Vitest config has likely DOM environment blockers.

Findings3
Failures2
Warnings0
TargetDOM
fail

No DOM test environment detected

Vitest runs in a Node environment by default. DOM tests usually need environment: 'jsdom' or 'happy-dom'.

fail

Error text points to missing DOM globals

The pasted error mentions missing browser globals, but the config does not show a DOM environment.

info

Vitest globals are enabled

This is valid, but keep TypeScript test globals configured separately if the editor still reports missing names.

Parsed fields

environment: missingsetupFiles: missingglobals: truejsdom: nohappy-dom: no

Safe report

Vitest jsdom/happy-dom environment preflight
Status: fail
Summary: The pasted Vitest config has likely DOM environment blockers.

Parsed config:
- target: dom
- environment: missing
- setupFiles: missing
- globals: true
- jsdom dependency: no
- happy-dom dependency: no
- per-file environment: no

Findings:
- fail: No DOM test environment detected - Vitest runs in a Node environment by default. DOM tests usually need environment: 'jsdom' or 'happy-dom'.
- fail: Error text points to missing DOM globals - The pasted error mentions missing browser globals, but the config does not show a DOM environment.
- info: Vitest globals are enabled - This is valid, but keep TypeScript test globals configured separately if the editor still reports missing names.

Checklist:
- Use jsdom or happy-dom for tests that touch document, window, or rendered components.
- Keep jsdom or happy-dom in devDependencies when that environment is selected.
- Put matchers and polyfills in setupFiles when every test needs them.
- Run the real Vitest suite after this static preflight.

What this checks

It checks static Vitest config for jsdom, happy-dom, setupFiles, globals, DOM error clues, and whether the selected environment has a matching devDependency.

What this does not do

It does not run Vitest, execute app code, install dependencies, inspect your repository, or prove that rendered component tests are correct.