test: MVP-4 Sprint 4 - Version history tests

- Add 11 tests for versions.ts (create, get, restore, edge cases)
- Add noteVersion mock to api.integration.test.ts
This commit is contained in:
2026-03-22 17:45:53 -03:00
parent 9ed7d8acec
commit a67442e9ed
2 changed files with 172 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ const mockPrisma = {
create: jest.fn(),
createMany: jest.fn(),
},
noteVersion: {
create: jest.fn(),
findMany: jest.fn(),
findUnique: jest.fn(),
},
$transaction: jest.fn((callback) => callback(mockPrisma)),
}