feat: add testing infrastructure utilities#8
Conversation
- Add user and account test factories for creating test entities - Add database helper for test DB setup/teardown and table clearing - Add auth helper for JWT token creation in tests - Add test-app helper for creating test NestJS applications - Add users E2E test example demonstrating factory usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add user.factory.spec.ts with 24 tests covering: - createTestUser with defaults and custom options - createTestUserWithProvider - createTestSuperAdmin - createTestInvitedUser - Add account.factory.spec.ts with 13 tests covering: - createTestAccount with defaults and options - createTestAccounts bulk creation - Add auth.helper.spec.ts with 23 tests covering: - createTestJwt with claims - createAuthHeader - createUserAuthHeader - createAdminJwt, createSuperAdminJwt - decodeTestJwt, getTestJwtSecret - Add database.helper.spec.ts with 18 tests covering: - createTestDataSource configuration - setupTestDatabase, teardownTestDatabase - clearTables with transaction handling - clearAllTables, resetDatabase - Add Jest moduleNameMapper for src/* path resolution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded@aabrius has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 27 minutes and 51 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (14)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Test plan
npm test -- --testPathPattern="user.factory|account.factory|auth.helper|database.helper"to verify all tests pass🤖 Generated with Claude Code