Skip to content

test: カバレッジ拡大 (+24 tests, 144 → 168)#55

Merged
Pregum merged 1 commit intomainfrom
test/expand-coverage
Apr 23, 2026
Merged

test: カバレッジ拡大 (+24 tests, 144 → 168)#55
Pregum merged 1 commit intomainfrom
test/expand-coverage

Conversation

@Pregum
Copy link
Copy Markdown
Owner

@Pregum Pregum commented Apr 23, 2026

Summary

最近実装したモジュール + 既存でカバレッジが薄かった箇所にテストを追加。合計 144 → 168 tests (+24)

追加内容

ファイル 追加 対象
tests/refs.test.ts 新規 5 件 resolveRefs: passthrough / 展開 / 未解決 / descendants / ネスト
tests/interpolate.test.ts +5 件 t=0,1 identity / stroke.fill 色 / 片側 undefined / 3-digit hex / cornerRadius+rotation
tests/buildPath.test.ts +4 件 負数・小数 / 小文字コマンド / C 引数不足 null / Z 単独 null
tests/snapEngine.test.ts +2 件 statics 空 / 垂直重なり無い場合
tests/constraints.test.ts +3 件 no-op / 両軸 scale / center+stretch 複合
tests/variables.test.ts +5 件 selectedTheme 適用 / extractThemeAxes 4 ケース

Test plan

  • npm test で 168 件全 pass
  • 既存テストの回帰なし(13 ファイル → 13 ファイルのまま)

🤖 Generated with Claude Code

…ariables)

144 → 168 tests (+24)

- tests/refs.test.ts 新規 (5)
  - passthrough, reusable → ref 展開 (fill 継承)、未解決 ref → unsupported、
    descendants override、ネストした ref の再帰展開
- tests/interpolate.test.ts (+5 件)
  - t=0 / t=1 identity、stroke.fill 色補間、片側 undefined 時の維持、
    3-digit hex 入力、cornerRadius / rotation
- tests/buildPath.test.ts (+4 件 parsePathD エッジ)
  - 負数・小数座標、小文字コマンド受容、C コマンド引数不足は null、
    Z 単独は null
- tests/snapEngine.test.ts (+2 件 equalSpace エッジ)
  - statics 空、perpendicular 軸で重ならない場合
- tests/constraints.test.ts (+3 件)
  - no-op、両軸 scale 半分、center/stretch 複合
- tests/variables.test.ts (+5 件)
  - selectedTheme 適用、extractThemeAxes(null / 空 / 有効 / 混在)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Pregum Pregum merged commit a126d5e into main Apr 23, 2026
1 check passed
@Pregum Pregum deleted the test/expand-coverage branch April 23, 2026 05:03
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.

1 participant