Issue #20 — test: Data Access Layer Integration Tests
Description
The Data Access Layer handles critical identity and financial mappings. Unit testing with mocks is insufficient; integration tests against the actual Prisma engine prove that cascading relationships, uniqueness constraints, and complex queries behave as expected.
Requirements & Context
Dependencies: Issue #19
Implementation Expectations: Write integration tests for UserRepository, WalletRepository, and EscrowIntentRepository.
Validation Considerations: Explicitly test database constraint violations (e.g., duplicate emails) to ensure they throw the expected Prisma errors.
Acceptance Criteria
Out of Scope
- Testing the Express controllers or HTTP boundaries.
Suggested Execution
git checkout -b test/data-access-repositories
Suggested Commit Message
test: implement integration tests for prisma repositories
Testing Notes
- Intentionally trigger unique constraint failures and verify the repository layer handles them predictably.
References
Prisma Client Error reference.
Definition of Done
Issue #20 — test: Data Access Layer Integration Tests
Description
The Data Access Layer handles critical identity and financial mappings. Unit testing with mocks is insufficient; integration tests against the actual Prisma engine prove that cascading relationships, uniqueness constraints, and complex queries behave as expected.
Requirements & Context
Dependencies: Issue #19
Implementation Expectations: Write integration tests for
UserRepository,WalletRepository, andEscrowIntentRepository.Validation Considerations: Explicitly test database constraint violations (e.g., duplicate emails) to ensure they throw the expected Prisma errors.
Acceptance Criteria
Out of Scope
Suggested Execution
Suggested Commit Message
Testing Notes
References
Prisma Client Error reference.
Definition of Done