Skip to content

test: エラーハンドリング機能のテスト追加とカバレッジ改善#30

Merged
GOROman merged 2 commits intomainfrom
feature/fix-merge-conflicts
Mar 21, 2025
Merged

test: エラーハンドリング機能のテスト追加とカバレッジ改善#30
GOROman merged 2 commits intomainfrom
feature/fix-merge-conflicts

Conversation

@GOROman
Copy link
Owner

@GOROman GOROman commented Mar 21, 2025

変更内容

エラーハンドリング機能のテストを追加し、カバレッジを改善しました。

追加したテスト

  1. エラークラスのテスト
  • AppError、NetworkError、LLMError、ConfigError、ProxyErrorの基本機能
  • エラーの継承関係
  • メタデータの設定と取得
  • isAppError関数の動作確認
  1. エラーハンドリングミドルウェアのテスト
  • 各種エラーの適切な処理
  • ステータスコードの設定
  • エラーレスポンスのフォーマット
  • スタックトレースの処理(開発環境のみ)

カバレッジ改善

  • エラーハンドリング関連のコードは100%のカバレッジを達成
  • エラーレスポンスの型安全性を向上
  • エラーログ出力の改善

変更ファイル

  • src/proxy/tests/error-handler.test.ts
  • src/services/filter-service.ts
  • src/utils/tests/errors.test.ts

GOROman added 2 commits March 20, 2025 16:07
- PRテンプレートの追加
  - プロジェクトルールに基づくチェックリスト
  - テスト要件の確認項目
  - コーディング規約の確認項目

- Git運用フローのドキュメント作成
  - ブランチ戦略の詳細化
  - コミットメッセージの規約
  - PRレビュープロセス
  - CI/CD連携

Issue #28 対応
- AppError、NetworkError、LLMError、ConfigError、ProxyErrorのテストを追加
- エラーハンドリングミドルウェアのテストを追加
- カバレッジを100%に改善
- エラーレスポンスの型安全性を向上
@GOROman GOROman requested a review from Copilot March 21, 2025 06:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves error handling test coverage by adding tests for various error classes and the error-handling middleware, and updates error messages with standardized error codes. Key changes include updates to test files for error classes, modifications to error construction in the FilterService, and documentation updates covering the PR template and Git workflow.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/pull_request_template.md Added and updated sections for improved PR detail guidance
docs/git-workflow.md Added comprehensive Git workflow guidelines
src/utils/tests/errors.test.ts Updated error class tests; merge conflict markers need resolution
src/services/filter-service.ts Updated error instantiation with consistent error codes
src/proxy/tests/error-handler.test.ts Maintained middleware test functionality
Comments suppressed due to low confidence (1)

src/utils/tests/errors.test.ts:4

  • Unresolved merge conflict markers found in this file. Please resolve the conflicts and remove all merge markers (e.g., <<<<<<<, =======, >>>>>>>) before merging.
<<<<<<< HEAD

@GOROman GOROman merged commit adc4ff1 into main Mar 21, 2025
0 of 3 checks passed
@GOROman GOROman deleted the feature/fix-merge-conflicts branch March 21, 2025 07:01
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.

2 participants