Add user database service and unit tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m28s

- Implement user database service with functions for user management (create, find, update, delete).
- Add comprehensive unit tests for user database service using Vitest.
- Mock database interactions to ensure isolated testing.
- Create setup files for unit tests to handle database connections and global mocks.
- Introduce error handling for unique constraints and foreign key violations.
- Enhance logging for better traceability during database operations.
This commit is contained in:
2025-12-04 15:30:27 -08:00
parent 4cf587c8f0
commit 80d2b1ffe6
62 changed files with 135 additions and 136 deletions

513
src/services/db/user.db.ts Normal file

File diff suppressed because it is too large Load Diff