Skip to content

Tauri MockRuntimeを使ったコマンド層の結合テストを追加#15

Merged
HMasataka merged 2 commits into
mainfrom
feat/tauri-mock-runtime-tests
Feb 24, 2026
Merged

Tauri MockRuntimeを使ったコマンド層の結合テストを追加#15
HMasataka merged 2 commits into
mainfrom
feat/tauri-mock-runtime-tests

Conversation

@HMasataka
Copy link
Copy Markdown
Owner

Summary

  • Tauri v2のtauri::testモジュール(MockRuntime)を使い、IPCレイヤーを通したコマンド層の結合テストを19件追加
  • dev-dependenciesにtauri test featureを追加し、commands/stateモジュールをpub化
  • テスト内容をdocs/testing.mdにドキュメント化

テストカバレッジ

モジュール テスト数 内容
エラーハンドリング 1 リポジトリ未設定時のエラー
commands/git.rs 8 status, stage, unstage, commit, branch, diff, head message
commands/branch.rs 2 list, create + checkout
commands/remote.rs 2 list (empty), add + list
commands/tag.rs 2 list (empty), create + list
commands/stash.rs 1 list (empty)
commands/history.rs 1 commit log
commands/conflict.rs 1 is_merging
commands/rebase.rs 1 is_rebasing

Test plan

  • cargo test --manifest-path src-tauri/Cargo.toml — 全106テスト通過(既存87 + 新規19)
  • cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings — 警告なし
  • 既存テストへのリグレッションなし

🤖 Generated with Claude Code

HMasataka and others added 2 commits February 24, 2026 12:08
dev-dependenciesにtauri test featureを追加し、
結合テストからアクセスできるようcommands/stateモジュールをpubに変更

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
IPC経由でのコマンド呼び出し・AppState・シリアライズを検証する
19テストケースを実装し、テスト内容をdocs/testing.mdにまとめた

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HMasataka HMasataka merged commit da13192 into main Feb 24, 2026
5 checks passed
@HMasataka HMasataka deleted the feat/tauri-mock-runtime-tests branch February 24, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant