chore: vitestによるテスト基盤を導入#83
Merged
Merged
Conversation
- vitest v4をdevDependenciesに追加 - vitest.config.tsでパスエイリアス解決を設定 - ValueObject基底クラスのユニットテストをサンプルとして追加 - GitHub Actions test.ymlワークフローを追加 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Vitest を用いたユニットテスト基盤を導入し、サンプルとして ValueObject のテスト追加と GitHub Actions での自動実行を可能にする変更です。
Changes:
- Vitest を devDependencies に追加し、
npm test/npm run test:watchを追加 vitest.config.tsを追加し、#domain/#application/#infrastructureのパスエイリアス解決を設定ValueObjectのユニットテスト(8ケース)と、CI 用のtest.ymlワークフローを追加
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Vitest 設定(テスト対象とパスエイリアス)を追加 |
| src/domain/base/ValueObject.test.ts | ValueObject のサンプルユニットテストを追加 |
| package.json | Vitest 追加とテスト用 npm scripts を追加 |
| package-lock.json | Vitest/Vite 関連依存のロック更新 |
| .github/workflows/test.yml | push/PR 時に npm test を実行する CI を追加 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npmパッケージの慣習に従い、src/からtests/に配置変更。 tsconfig.jsonのincludeにtestsを追加してエディタ補完を有効化。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- vitest.config.tsでfileURLToPathを使用しWindows互換性を確保 - equalsテスト名をJSON比較であることを明示する表現に修正 - package.jsonにengines.nodeフィールドを追加 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
チーム合意が必要な変更のため、テストインフラPRのスコープ外とする。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
KinjiKawaguchi
added a commit
that referenced
this pull request
Mar 23, 2026
## Summary - vitest v4をdevDependenciesに追加し、`npm test` / `npm run test:watch` スクリプトを追加 - `vitest.config.ts`でパスエイリアス(`#domain`, `#application`, `#infrastructure`)を解決 - `ValueObject`基底クラスのユニットテストをサンプルとして追加(8テストケース) - GitHub Actions `test.yml`ワークフローを追加(push/PR時に自動実行) ## Test plan - [x] `npm test` で8件のテストが全てパスすること - [x] `npx biome check` がパスすること - [x] GitHub Actions test workflowが正常に実行されること 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/su-its/core/pull/83" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
npm test/npm run test:watchスクリプトを追加vitest.config.tsでパスエイリアス(#domain,#application,#infrastructure)を解決ValueObject基底クラスのユニットテストをサンプルとして追加(8テストケース)test.ymlワークフローを追加(push/PR時に自動実行)Test plan
npm testで8件のテストが全てパスすることnpx biome checkがパスすること🤖 Generated with Claude Code