Configure test infrastructure (Vitest + Playwright + Docker) #9

Open
opened 2026-07-22 21:18:10 +00:00 by Ninosaurier · 0 comments
Owner

Context

A reliable testing setup needed to be in place before feature work starts, covering both plain unit tests and real-browser component tests, without relying on inconsistent local browser installations across contributors.

What was done

  • Configured Vitest as the single test runner for both unit tests (*.unit.test.ts) and component/browser tests (*.cmp.test.tsx), per ADR-0002
  • Integrated Playwright as Vitest's browser provider (@vitest/browser-playwright) for real-browser component testing
  • Containerized the browser test execution (Dockerfile.test, docker-compose.test.yaml) so tests run in an identical, reproducible environment locally and in CI
  • Set up the accessibility testing utilities (src/testing/a11y) with axe-core integration, per ADR-0005

Outcome

  • pnpm test:unit, pnpm test:component, and pnpm test all runnable locally and reproducibly via Docker
  • Documented in the Technology Architecture (Section 6.6, "Test Execution Environment")

Related

  • packages/luna-charts/vitest.config.ts
  • Dockerfile.test, docker-compose.test.yaml
  • docs/.../architecture/adm/technology-architecture.mdx
## Context A reliable testing setup needed to be in place before feature work starts, covering both plain unit tests and real-browser component tests, without relying on inconsistent local browser installations across contributors. ## What was done - Configured Vitest as the single test runner for both unit tests (`*.unit.test.ts`) and component/browser tests (`*.cmp.test.tsx`), per ADR-0002 - Integrated Playwright as Vitest's browser provider (`@vitest/browser-playwright`) for real-browser component testing - Containerized the browser test execution (`Dockerfile.test`, `docker-compose.test.yaml`) so tests run in an identical, reproducible environment locally and in CI - Set up the accessibility testing utilities (`src/testing/a11y`) with axe-core integration, per ADR-0005 ## Outcome - `pnpm test:unit`, `pnpm test:component`, and `pnpm test` all runnable locally and reproducibly via Docker - Documented in the Technology Architecture (Section 6.6, "Test Execution Environment") ## Related - `packages/luna-charts/vitest.config.ts` - `Dockerfile.test`, `docker-compose.test.yaml` - `docs/.../architecture/adm/technology-architecture.mdx`
Ninosaurier added this to the v0.2.0 - Phase 2: Foundation milestone 2026-07-22 21:18:10 +00:00
Ninosaurier self-assigned this 2026-07-22 21:18:10 +00:00
Ninosaurier added the Kind/TestingPriority/High labels 2026-07-22 21:20:41 +00:00
Sign in to join this conversation.