Skip to content

テストの拡充とドキュメントの整備 - #102

Merged
touyou merged 6 commits into
mainfrom
test/coverage-full
Jul 9, 2025
Merged

テストの拡充とドキュメントの整備#102
touyou merged 6 commits into
mainfrom
test/coverage-full

Conversation

@touyou

@touyou touyou commented Jul 4, 2025

Copy link
Copy Markdown
Member

…ent test helpers for improved testing structure

概要

変更内容

  • テストを拡充しました
  • AI関連のドキュメントを更新しました

動作確認

  • pnpm lint を実行
  • pnpm build を実行してプロジェクトが正常にビルドされることを確認
  • pnpm test を実行してテストがすべて成功することを確認

関連 Issue

touyou added 2 commits July 4, 2025 12:03
…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.
@touyou
touyou requested a review from ore0 July 4, 2025 03:10
@touyou touyou self-assigned this Jul 4, 2025
Copilot AI review requested due to automatic review settings July 4, 2025 03:10
@vercel

vercel Bot commented Jul 4, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sparkle-design ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 7:49am

Copilot AI left a comment

Copy link
Copy Markdown

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 expands test coverage across UI components, adds shared test helpers for consistent testing patterns, and updates documentation and project scripts for testing workflows.

  • Introduces TestContainer and various helper functions in src/test/helpers.ts to streamline component tests.
  • Adds comprehensive tests for UI components under src/components/ui/*, leveraging the new helpers.
  • Updates package.json, TESTING_INSTRUCTIONS.md, and GEMINI.md with 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.md doesn't exist; update to point to TESTING_INSTRUCTIONS.md (or the correct relative path).
- **必読**: `.github/instructions/testing.instructions.md` でテストガイドライン全体を確認

src/components/ui/input/index.test.tsx:91

  • The handleClick mock is not declared in this test, causing a reference error. Add const handleClick = vi.fn(); before using it.
      );

- コメントスタイルガイドラインを新規作成
- 不要なファイルを削除
- README.mdにガイドラインへのリンクを追加
- 各種指示ファイルへの参照を更新
- pnpmと関連する依存関係を追加
- テストヘルパーのインポートを更新
- Vitestのテストセットアップファイルを追加
- テスト環境の設定を改善
- AIアシスタントの設定に関するドキュメントを削除しました。
- AIアシスタントの設定とプロジェクト概要を追加
- 開発フローにおける主要なコマンドを明確化
- コミットメッセージやコードコメントのスタイルガイドを強調
- テスト基準とAI開発ガイドラインの参照を整理

@ore0 ore0 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@touyou
touyou merged commit ed2a2b0 into main Jul 9, 2025
@touyou
touyou deleted the test/coverage-full branch July 9, 2025 09:57
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.

3 participants