Skip to content

[documentation] テスト規約(CLAUDE.md)を stub-fetch unit test の実態に合わせる #55

Description

@yk-lab

概要

CLAUDE.md の Conventions は「Tests cover pure logic only … Network/IO modules (github, download, install, main) are validated end-to-end by self-test.yml」と記載するが、実態は tests/github.test.tsfetch を stub して network 挙動(content-type ガード・リダイレクト検証等)を unit test しており、規約と乖離している。

背景

#42 のレビュー(cubic P2)で download.test.ts に stub-fetch テストを足した際「規約違反」と指摘された。実際には HTTP モジュールの決定的ロジックは stub で unit test するのが既に常態。次に触る人が迷わないよう doc を実態へ合わせる。

受け入れ条件

  • CLAUDE.md のテスト方針を更新し「HTTP モジュール(github 等)の決定的ロジックは fetch を stub した unit test 可。実際の IO 経路は self-test.yml で E2E」と明記する
  • download.test.ts の方針(../src/github を mock してオーケストレーションのみ検証)とも整合するよう言及する

参照

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3: lowあれば嬉しい / 将来documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions