テストの拡充とドキュメントの整備 - #102
Merged
Merged
Conversation
…ent test helpers for improved testing structure
- Updated test cases for the Spinner component to use consistent formatting and style. - Added semicolons for consistency across the test file. - Improved readability by ensuring consistent use of quotes and spacing. - Enhanced accessibility tests to ensure proper role and aria-label attributes are set. - Verified that custom class names and attributes are applied correctly. - Ensured that error handling tests cover invalid and extreme size values. - Confirmed that conditional rendering and performance tests function as expected.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
This PR expands test coverage across UI components, adds shared test helpers for consistent testing patterns, and updates documentation and project scripts for testing workflows.
- Introduces
TestContainerand various helper functions insrc/test/helpers.tsto streamline component tests. - Adds comprehensive tests for UI components under
src/components/ui/*, leveraging the new helpers. - Updates
package.json,TESTING_INSTRUCTIONS.md, andGEMINI.mdwith new test scripts and instructions for AI-assisted test analysis.
Reviewed Changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/helpers.ts | Added TestContainer and event/A11y/Style helpers |
| src/components/ui/**/index.test.tsx | Added or refactored component tests |
| src/components/ui/spinner/index.tsx | Added data-testid="loading-spinner" |
| package.json | Added new test scripts (test:watch, AI workflows) |
| TESTING_INSTRUCTIONS.md | Expanded testing guidelines and AI workflow steps |
| GEMINI.md | Added testing guidelines and script references |
Comments suppressed due to low confidence (2)
GEMINI.md:37
- The referenced file path
.github/instructions/testing.instructions.mddoesn't exist; update to point toTESTING_INSTRUCTIONS.md(or the correct relative path).
- **必読**: `.github/instructions/testing.instructions.md` でテストガイドライン全体を確認
src/components/ui/input/index.test.tsx:91
- The
handleClickmock is not declared in this test, causing a reference error. Addconst handleClick = vi.fn();before using it.
);
- コメントスタイルガイドラインを新規作成 - 不要なファイルを削除 - README.mdにガイドラインへのリンクを追加 - 各種指示ファイルへの参照を更新
- pnpmと関連する依存関係を追加 - テストヘルパーのインポートを更新 - Vitestのテストセットアップファイルを追加 - テスト環境の設定を改善
- AIアシスタントの設定に関するドキュメントを削除しました。
- AIアシスタントの設定とプロジェクト概要を追加 - 開発フローにおける主要なコマンドを明確化 - コミットメッセージやコードコメントのスタイルガイドを強調 - テスト基準とAI開発ガイドラインの参照を整理
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ent test helpers for improved testing structure
概要
変更内容
動作確認
pnpm lintを実行pnpm buildを実行してプロジェクトが正常にビルドされることを確認pnpm testを実行してテストがすべて成功することを確認関連 Issue