Browser-free test tiers let coding agents verify every edit without a browser
A DEV Community post proposes running browser-free tests on every edit for coding agents, while reserving real-browser end-to-end tests for CI or deliberate runs. The first tier covers logic tests and DOM-emulated component tests that run in plain Node, Python or Go, which suits a sandbox's default image. The author notes that emulated DOMs such as jsdom and happy-dom lack layout and navigation support, so a passing run does not prove a page renders or that clicks navigate correctly. The post explains how to split test projects and environments in Vitest and Jest, including excluding browser projects via CLI negation patterns. It also warns about filters that can silently select no tests.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in