| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Tests are categorized by directory so a focused suite can run on its own. Every suite is plain node:test; happy-dom provides the DOM where needed.
| Suite | Run | Covers |
|---|---|---|
| tests/unit/ | pnpm run test:unit | Pure module units: signals, scheduler, handlers, cache, partials, registries, async signals, delay. |
| tests/runtime/ | pnpm run test:runtime | DOM runtime: loader activation and swaps, components, elements, app runtime (SSR render + browser activation), runtime events/signals, boundary receiver, flow bridge. |
| tests/router/ | pnpm run test:router | Route matching, navigation modes, server route partials, prefetch, router state. |
| tests/server/ | pnpm run test:server | Server envelope protocol, server proxy/transport, server registries. |
| tests/timing/ | pnpm run test:timing | Rendering and requestAnimationFrame gotchas (see below). |
| tests/performance/ | pnpm run test:performance | Hot-path performance contracts (see below). |
| tests/build/ | pnpm run test:build | Built dist/ artifacts, bundle guardrails, optimizer reports, size baselines, import boundaries, registry lint. Runs bundle first. |
| tests/examples/ | pnpm run test:examples | Example apps compile and behave. |
pnpm test runs bundle and then every suite (tests/**/*.test.js). tests/fixtures/ holds shared fixtures and is not a suite.
Real browsers commit boundary swaps on animation frames; node commits synchronously. That difference has hidden two production bugs:
tests/timing/ forces frame timing explicitly (createScheduler({ requestAnimationFrame, frameFallbackMs })) so those browser-shaped failure modes stay covered by the node suite:
When adding frame- or commit-phase behavior, add its regression here with an explicit frame-timed scheduler — a green synchronous run does not prove the browser path.
Performance work lives in three places with three different jobs:
The hot-path registry, tests/performance/hot-paths.json, maps each hot-path source file to the contract tests that guard it, with a reason. hot-path-coverage.test.js enforces the registry: contracts must exist and declare their sources in a // @hot-paths: header, every performance test must be registered, and — the part that makes this automatic — every registered source must appear in the test.performance pipeline task inputs in pipeline.ts. The pipeline caches on those inputs, so touching a hot-path file is exactly what re-runs the performance suite.
To declare new code a hot path: add the registry entry, write the contract test with the // @hot-paths: header, and add the source file to the test.performance task inputs. The guardrail fails until all three agree.
| Back | FazBrowse Home | New Git URL |