Documentation
README
Bridge Server テスト
実行手順
以下を順番に実行し、全てパスすることを確認する。
1. ユニットテスト
npm run test:bridge
特定ファイルのみ:
cd packages/bridge && npx vitest run src/<filename>.test.ts
ウォッチモード (開発中):
cd packages/bridge && npx vitest src/<filename>.test.ts
2. TypeScript 型チェック
npx tsc --noEmit -p packages/bridge/tsconfig.json
テストファイル (*.test.ts) と vitest.config.ts は tsconfig.json の exclude に入っているため、型チェック対象外。
3. カバレッジ (任意)
npm run test:bridge:coverage
テスト記述規約
ファイル配置・命名
- テストファイルはソースと同じディレクトリに
<module>.test.tsとして配置- 例:
src/parser.ts→src/parser.test.ts
- 例:
- vitest.config.ts の include パターン:
src/**/*.test.ts
import
import { describe, it, expect } from "vitest";
This is the opening of the README. Read the full README on GitHub.