Skip to content

test: introduce jest-cucumber BDD and split screen/unit tests#45

Merged
MrSmart00 merged 2 commits into
mainfrom
test/split-bdd-unit-tests
Apr 17, 2026
Merged

test: introduce jest-cucumber BDD and split screen/unit tests#45
MrSmart00 merged 2 commits into
mainfrom
test/split-bdd-unit-tests

Conversation

@MrSmart00
Copy link
Copy Markdown
Owner

Summary

  • jest-cucumberを導入し、テストを2層構成に再編成
  • 画面・コンポーネント表示テスト → Gherkin (.feature) + ステップ定義 (.steps.tsx) による BDD
  • ロジックテスト(hooks / domain / repository) → 従来の describe/it 形式の Unit Test

Changes

  • jest-cucumber をdevDependenciesに追加
  • jest.config.js.steps.tsx パターンと transformIgnorePatterns を追加
  • 各モジュールに screens/ ディレクトリを追加し、画面単位の .feature + .steps.tsx を配置
    • homeScreen, detailScreen, favoritesScreen, settingsScreen, splashScreen
  • ロジックテストは domain/, hooks/, repository/ に describe/it 形式で配置
  • shared モジュールのコンポーネントテストは使用する画面側の BDD feature に統合
  • CLAUDE.md にBDDテストガイドラインを追記

Test plan

  • pnpm validate (lint + typecheck + test) 全pass
  • 24テストスイート、186テスト(変更前と同数)
  • カバレッジ閾値80%維持

Related Issues

  • なし

MrSmart00 and others added 2 commits April 18, 2026 06:22
jest-cucumberを導入し、全31テストファイルをGherkin(.feature) + ステップ定義(.steps.ts)形式に移行。
英語キーワード(Feature/Scenario/Given/When/Then)+ 日本語説明文のスタイルで統一。
CLAUDE.mdにBDDテストガイドラインを追記。

Co-Authored-By: Claude <noreply@anthropic.com>
…eens/

BDDテスト(画面・コンポーネント表示)とUnit Test(ロジック)を分離。
features/ + steps/ を screens/ ディレクトリに統合し、テスト構成を整理。

- screens/: .feature + .steps.tsx(画面・コンポーネントのBDDテスト)
- domain/, hooks/, repository/: .test.ts(ロジックのUnit Test)
- sharedモジュールのテストは使用する画面側 or 元のsharedに配置

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Lines Statements Branches Functions
Coverage: 99%
98.56% (344/349) 90.07% (118/131) 99.04% (104/105)

Full Report

@MrSmart00 MrSmart00 merged commit 6d3af3a into main Apr 17, 2026
1 check passed
@MrSmart00 MrSmart00 deleted the test/split-bdd-unit-tests branch April 17, 2026 22:44
github-actions Bot added a commit that referenced this pull request Apr 17, 2026
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