| 層 | 場所 | 実行 | 何を保証するか |
|---|---|---|---|
| 単体 | tests/unit/ |
npm test |
parser / render / geometry / dnd / fit・boxes / importMaster / workspace / settings・外観 / editor 拡張 / 各コンポーネント / electron/python.ts の探索順 |
| 内部結合 | tests/integration/ |
npm test |
store を通した Markdown→スライド→保存の一連、フォルダ監視と競合、Electron ブリッジ経由の書き出し |
| Python | tests/python/ |
npm run test:py |
deck.json v2 → pptx。レイアウト解決、画像内接、表、ノート、警告、失敗時のメッセージ。tools/mdslide_draw.py の図。scripts/install.sh(macOS のみ): 隔離属性を付けずに入れる、署名が合わなければ入れない、入れ替え |
| E2E(Web) | tests/e2e/test_web.py |
npm run test:e2e |
ビルド済みレンダラを headless Chromium で操作。フォルダは OPFS で代替 |
| E2E(Electron) | tests/e2e/test_electron.py |
npm run test:e2e:electron |
実アプリを起動し CDP で操作。argv 起動、chokidar、起動時の Python 確認と pptx 生成、端末での claude 自動起動、設定シートと外観、下書きから図生成と取り消し |
vitest.config.ts): lines/statements/functions 80%、branches 70%。下回ると test:coverage が失敗する。対象は src/ だけ(electron/ は含まない)。--cov=tools で 85% 以上を目安。pip install -r requirements-dev.txt と python -m playwright install chromium。バージョンは requirements*.txt と package.json で完全一致に固定している(更新は Dependabot の PR 経由)。ci.yml unit(ubuntu-24.04): npm ci --ignore-scripts のあと typecheck、test:coverage、test:py、test:e2e。tests/python/test_install_script.py は Linux では skipci.yml electron-mac(macos-26): npm ci --ignore-scripts && npm run rebuild のあと tests/python/test_install_script.py と test:e2e:electronrelease.yml(v* タグ): build(contents: read)が typecheck と npm test、dist:mac、dmg の中のアプリの codesign --verify --deep --strict、zip からインストール用スクリプトで入れて署名を確認、ライセンス表示と Electron fuses を確認し、dmg / zip を成果物に上げる。publish(contents: write)が下書きのリリースに添付して公開する(ADR-0027)persist-credentials: false)。action はコミット SHA、runner は版で固定するtests/unit/workspace.test.ts)。Range.getClientRects)は tests/setup.ts でスタブする。claude)claude --version が通る Mac で npm run dev、フォルダを開くclaude が自動で立ち上がる(立ち上がらない場合は、コンソールバーで Claude Code を選んで「起動」)npm run rebuild が失敗した環境では、DevTools で await window.mdslide.ptyBackend() が "host" を返す(ホスト中継にフォールバックしている)ことを確認xattr -dr com.apple.quarantine /Applications/mdslide.app を実行し、開けることを確かめるgh release verify v<版> と gh release verify-asset v<版> mdslide-<版>-arm64.dmg(ダウンロードしたファイルで)が通ることを確かめる(Immutable releases のリリース証明。ADR-0027)