CodeVetter · Repo Unpack · Testing signals
withastro/astro
Tests and CI were inspected, not executed; a test's existence is not a passing result. Core tests use node:test with built dist imports, while browser tests use Playwright and benchmark tooling uses Vitest. Inspected cases cover persistence, action behavior, origin-check composition, provider finalization, and hydration recovery. CI defines lint, type, cross-platform test, browser, smoke, and benchmark jobs. Inspection was bounded, so coverage completeness and untested repository-wide behavior remain unestablished.
- Core unit-test guidance requires node:test and node:assert/strict, placement under package test/units, and imports from built dist output.
- Astro's test script runs unit, integration, and type suites; unit tests use strip-types and teardown, integration tests use parallel execution, and browser suites run Chrome and Firefox configurations.
- astro-scripts test uses node:test.run(), supports match/only/parallel/setup/teardown options, and selects process isolation for parallel tests versus no isolation for sequential tests.
- Store-persistence tests assert restored data after updates and include chunked entry records crossing part boundaries.
- Action integration tests create a fixture with a unique outDir, start dev, build a test-adapter app, and assert invalid direct invocation and form-action page results.
- Action origin tests mount Hono actions() before middleware() and assert that cross-origin requests return 403 without executing the action, while same-origin requests execute it.
- Endpoint origin tests mount pages() without middleware() and assert cross-origin rejection before endpoint execution; provider-finalization tests assert a 500 when a finalizer rejects.
- Playwright hydration tests abort the first component import and assert recovery without reload; persistent failure tests assert one hydration-error event and no page errors.
- CI's Astro/integration matrix covers Ubuntu with Node 22 and 24, and macOS/Windows with Node 24 after explicit exclusions; separate jobs execute E2E and smoke scripts.
- CI includes Biome, lint:ci, publint, and typecheck; Linux ts-plugin test failures are converted to warnings, so that step is not a strict passing gate.
- Example diagnostics run test:check-examples; continuous benchmarks build benchmark projects and invoke Vitest benches through CodSpeed in four shards, which establishes configured measurement infrastructure but no observed performance result.