Skip to content

refactor(test): organize suite by clean-architecture layers#104

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/reorganize-test-layout-a459
Jul 16, 2026
Merged

refactor(test): organize suite by clean-architecture layers#104
cursor[bot] merged 2 commits into
mainfrom
cursor/reorganize-test-layout-a459

Conversation

@develop-iro

@develop-iro develop-iro commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

Reorganizes the test suite into a scalable test/ tree by clean-architecture layer, while the suite is still small enough to migrate cleanly.

test/
  domain/         # unit (*.spec.ts)
  application/    # use-case integration (*.integration.spec.ts)
  contracts/      # adapter contracts (*.contract.spec.ts)
  e2e/
    journeys/     # Playwright specs
    fixtures/     # ready data
    doubles/      # API route doubles
    support/      # page helpers
  support/        # shared fixtures/doubles for non-e2e layers

Changes

  • Moved all src/**/*.spec.ts into the layer folders above (imports via @/)
  • Extracted e2e mocks into test/e2e/{fixtures,doubles,support}
  • Added @test/* path alias and sample test/support/fixtures/catalog-fund.ts
  • Updated runners: test:unit → domain/application/contracts; Playwright testDir./test/e2e
  • Documented in ADR-004, docs/architecture/testing-strategy.md, test/README.md, and .cursor/rules/testing-strategy.mdc

Test plan

  • pnpm run test:unit (138 cases pass)
  • pnpm run test:scripts
  • pnpm run typecheck
  • Pre-push test:ci including Playwright e2e
  • Reviewer: confirm layer placement of borderline specs (e.g. analytics route resolution → contracts)
Open in Web Open in Cursor 

Move specs from src/ into test/{domain,application,contracts} with
layer-specific naming, extract Playwright fixtures/doubles under
test/e2e, and document the layout (ADR-004, test/README, Cursor rule).
@develop-iro
develop-iro marked this pull request as ready for review July 16, 2026 16:17
Keep the test/ tree layout and ADR-004 guidance from this branch while
absorbing clean-architecture principles and learn CTA fixes from main.
@cursor
cursor Bot merged commit b42679e into main Jul 16, 2026
7 checks passed
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.

2 participants