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

オープン 初心者向け
#369 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
86/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
postgresql, typescript

調査の方向性

CONTRIBUTING.md、backend/package.json、backend/vitest.config.mtsから始めて、テストスイート、npmスクリプト、ポート設定を確認します。factoryに関するガイダンスはtests/factoriesを確認してください。テストスイート、単一ファイル、単一テストの実行方法、失敗した統合テストの調査方法、古くなった組み込みクラスターのクリーンアップ方法を、macOSとLinuxの違いも含めて説明します。ガイドがREADMEからリンクされ、レビュアーがクリーンなcloneで記載されたコマンドを実行できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
11
フォーク
57
平均マージ
20時間 41分
マージ済み PR(30日)
67

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DocForum/docforum-core のほかの issue

DocForum/docforum-core の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。