Skip to content

Commit 7a47a93

Browse files
committed
test: refactor project-management tests to use TestDataFactory and real test DB
- Replace mocked Prisma usage in hierarchy-service.test.ts and prisma-project-service.test.ts with TestDataFactory + getTestDatabase - Remove vi-based Prisma mocks and mock expectations; import TestDataFactory/PrismaClient and create real test records in beforeEach - Update tests to assert on created records (ids, fields, event counts) rather than mock call assertions - Update tools/test-utils TestDataFactory API: - change factory methods to accept object params (createWorkspace, createDevlogEntry, createChatSession, createAgentSession) - implement createAgentEvent (links agent events to workspace/project) - extend createCompleteSetup to accept project/machine/workspace options - Update IMPLEMENTATION.md to reflect Phase 2 completion and updated test metrics This shifts these suites from mocked unit tests toward factory-backed integration tests, improving isolation and reliability.
1 parent 77a8cca commit 7a47a93

File tree

4 files changed

+361
-796
lines changed

4 files changed

+361
-796
lines changed

0 commit comments

Comments
 (0)