[Docs] Testing guide: running and debugging the integration suites

Abierto Apto para principiantes
#369 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
86/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
postgresql, typescript

Línea de trabajo

Empieza por CONTRIBUTING.md, backend/package.json y backend/vitest.config.mts para identificar las suites de pruebas, los scripts npm y la configuración de puertos; revisa tests/factories para consultar las indicaciones sobre factories. Documenta cómo ejecutar una suite, un archivo o una prueba, inspeccionar una prueba de integración fallida y limpiar un clúster integrado obsoleto, incluidas las diferencias entre macOS y Linux. El trabajo estará terminado cuando la guía esté enlazada desde el README y un revisor pueda seguir sus comandos en un clon limpio.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Phase: 9 — Deploy & CI (see ROADMAP.md)

Description

CONTRIBUTING.md covers setup and what to run before a PR, but not how the self-contained embedded-Postgres integration suites work: which ports they use, how to run one file or one test, how to keep a database around to inspect after a failure, and what to do when a stale cluster blocks a port. New contributors lose time to this, and booking/referral/order work requires integration tests.

Requirements & context

What to do:

  • Add a testing section to CONTRIBUTING.md (or backend/tests/README.md) covering unit vs integration vs property vs testnet suites and their npm scripts.
  • Document per-suite ports, running a single file/test, debugging a failing test, and cleaning up stale embedded clusters.
  • Explain how to use the factories in tests/factories for new tests.

Files likely involved:

  • CONTRIBUTING.md
  • backend/tests/factories/index.ts
  • backend/vitest.config.mts
  • backend/package.json

Edge cases / constraints:

  • Keep it accurate for macOS and Linux; note anything that differs.
  • Follow the ARCHITECTURE_ESSENTIALS.md hard rules (module boundaries, append-only orders, DB-level booking guarantees, no invented schema fields without documenting them for ARCHITECTURE.md §4 in a docs.d/ fragment).

Suggested execution

  1. Fork the repo and branch off main: git checkout -b docs/testing-guide-running-and-debugging-the-integrat
  2. Implement the changes above. If you hit a design question the issue doesn't answer, comment here before guessing.
  3. Run npm run typecheck, npm test and npm run test:integration in backend/. Booking, referral, order and payment flows need integration tests, not only unit tests (AGENTS.md).
  4. Commit with a clear message, for example: docs(docs): Testing guide: running and debugging the integration suites
  5. Open a PR against main with Closes #<this issue number> in the description.

Definition of done

  • Testing guide merged
  • Linked from the README
  • A changelog.d/<issue-number>-<short-slug>.md fragment (see changelog.d/README.md), and, if models or endpoints changed, the new ARCHITECTURE.md §4 / docs/api/README.md lines in a docs.d/<issue-number>-<short-slug>.md fragment (see docs.d/README.md)
  • CI green

How this will be reviewed

Reviewer follows the guide on a clean clone and checks each command works as written.

Guidelines

  • Claiming: comment to claim before you start, and check nobody else is assigned.
  • PR description: say what changed and why, include Closes #<issue>, and paste test output (plus screenshots for UI work).
  • Timeframe: open a PR within 7 days of assignment. If you get stuck, say so in the issue early rather than going quiet.

Not blocked by: any other open issue.

Lenguaje dominante
TypeScript
Estrellas
11
Forks
57
Merge medio
20 h 41 min
PR fusionados (30 d)
67

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DocForum/docforum-core

Todos los issues de DocForum/docforum-core

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.