Commit Graph

22 Commits

Author SHA1 Message Date
c9b7a75429 more and more test fixes
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 17m59s
2026-01-04 12:30:44 -08:00
d024935fe9 integration test fixes 2026-01-01 11:18:27 -08:00
748ac9e049 more db
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 51s
2026-01-01 02:30:06 -08:00
342f72b713 more db
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 45s
2025-12-31 20:44:00 -08:00
a10f84aa48 complete project using prettier! 2025-12-22 09:45:14 -08:00
0cf4ca02b7 large mock refector hopefully done + no errors?
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h19m21s
2025-12-21 12:38:53 -08:00
c49e5f7019 large mock refector hopefully done + no errors?
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h13m59s
2025-12-21 02:43:03 -08:00
d5f185ad99 Refactor tests and improve error handling across various services
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 10m38s
- Updated `useAuth` tests to use async functions for JSON responses to avoid promise resolution issues.
- Changed `AdminBrandManager` tests to use `mockImplementation` for consistent mock behavior.
- Enhanced `ProfileManager.Authenticated` tests to ensure proper error handling and assertions for partial updates.
- Modified `SystemCheck` tests to prevent memory leaks by using `mockImplementation` for API calls.
- Improved error handling in `ai.routes.ts` by refining validation schemas and adding error extraction utility.
- Updated `auth.routes.test.ts` to inject mock logger for better error tracking.
- Refined `flyer.routes.ts` to ensure proper validation and error handling for flyer ID parameters.
- Enhanced `admin.db.ts` to ensure specific errors are re-thrown for better error management.
- Updated `budget.db.test.ts` to improve mock behavior and ensure accurate assertions.
- Refined `flyer.db.ts` to improve error handling for race conditions during store creation.
- Enhanced `notification.db.test.ts` to ensure specific error types are tested correctly.
- Updated `recipe.db.test.ts` to ensure proper handling of not found errors.
- Improved `user.db.ts` to ensure consistent error handling for user retrieval.
- Enhanced `flyerProcessingService.server.test.ts` to ensure accurate assertions on transformed data.
- Updated `logger.server.ts` to disable transport in test environments to prevent issues.
- Refined `queueService.workers.test.ts` to ensure accurate mocking of email service.
- Improved `userService.test.ts` to ensure proper mock implementations for repository classes.
- Enhanced `checksum.test.ts` to ensure reliable file content creation in tests.
- Updated `pdfConverter.test.ts` to reset shared state objects and mock implementations before each test.
2025-12-15 16:40:13 -08:00
6e8a8343e0 Refactor tests and API context integration
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 5m55s
- Updated tests in `useShoppingLists`, `useWatchedItems`, and various components to use `waitFor` for asynchronous assertions.
- Enhanced error handling in `errorHandler` middleware tests to include validation errors and status codes.
- Modified `AuthView`, `ProfileManager.Auth`, and `ProfileManager.Authenticated` tests to check for `AbortSignal` in API calls.
- Removed duplicate assertions in `auth.routes.test`, `budget.routes.test`, and `gamification.routes.test`.
- Introduced reusable logger matcher in `budget.routes.test`, `deals.routes.test`, `flyer.routes.test`, and `user.routes.test`.
- Simplified API client mock in `aiApiClient.test` to handle token overrides correctly.
- Removed unused `apiUtils.ts` file.
- Added `ApiContext` and `ApiProvider` for better API client management in React components.
2025-12-14 23:28:58 -08:00
69e2287870 linting done now fix unit tests
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 8m19s
2025-12-14 21:48:53 -08:00
d4739b5784 Refactor and update various service and route tests for improved type safety and clarity
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Added a new notes file regarding the deprecation of the Google AI JavaScript SDK.
- Removed unused imports and fixed duplicate imports in admin and auth route tests.
- Enhanced type safety in error handling for unique constraint violations in auth routes.
- Simplified gamification route tests by removing unnecessary imports.
- Updated price route to improve type safety by casting request body.
- Improved mock implementations in system route tests for better type handling.
- Cleaned up user routes by removing unused imports.
- Enhanced AI API client tests with more robust type definitions for form data.
- Updated recipe database tests to remove unused error imports.
- Refactored flyer processing service tests for better type safety and clarity.
- Improved logger client to use `unknown` instead of `any` for better type safety.
- Cleaned up notification service tests to ensure proper type casting.
- Updated queue service tests to remove unnecessary imports and improve type handling.
- Refactored queue service workers tests for better type safety in job processors.
- Cleaned up user routes integration tests by removing unused imports.
- Enhanced tests setup for unit tests to improve type safety in mocked Express requests.
- Updated PDF converter tests for better type safety in mocked return values.
- Improved price parser tests to ensure proper handling of null and undefined inputs.
2025-12-14 18:02:16 -08:00
edb0f8a38c Refactor database tests to improve type safety and error handling
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Updated mock implementations in various database service tests to use specific types (Pool, PoolClient) instead of 'any'.
- Enhanced error handling in tests by explicitly defining error types and codes, improving clarity and maintainability.
- Removed unnecessary eslint-disable comments related to 'any' usage.
- Cleaned up transaction mock implementations to ensure proper type casting.
- Adjusted error handling in the UserRepository to provide more specific error messages for foreign key constraints.
- Improved test assertions to ensure they are more robust and type-safe.
2025-12-14 13:29:38 -08:00
2affda25dc Refactor geocoding services and improve logging
- Updated the Nominatim geocoding service to use a class-based structure and accept a logger instance for better logging control.
- Modified tests for the Nominatim service to align with the new structure and improved logging assertions.
- Removed the disabled notification service test file.
- Added a new GeocodingFailedError class to handle geocoding failures more explicitly.
- Enhanced error logging in the queue service to include structured error objects.
- Updated user service to accept a logger instance for better logging in address upsert operations.
- Added request-scoped logger to Express Request interface for type-safe logging in route handlers.
- Improved logging in utility functions for better debugging and error tracking.
- Created a new GoogleGeocodingService class for Google Maps geocoding with structured logging.
- Added tests for the useAiAnalysis hook to ensure proper functionality and error handling.
2025-12-13 17:52:30 -08:00
117f034b2b ADR1-3 on routes + db files
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 17m30s
2025-12-12 16:09:59 -08:00
6aa72dd90b unit test fixin
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 8m50s
2025-12-11 00:53:24 -08:00
d230a2163e routes cleanup
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m3s
2025-12-09 22:17:39 -08:00
88fdb9886f many fixes resulting from latest refactoring
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 5m41s
2025-12-09 00:05:54 -08:00
158778c2ec DB refactor for easier testsing
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 5m16s
App.ts refactor into hooks
unit tests
2025-12-08 20:46:12 -08:00
0eda796fad App.tsx refactor + even more unit tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 8m28s
2025-12-08 12:18:46 -08:00
e022a4a2cc moar unit test !
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m42s
2025-12-08 10:06:13 -08:00
6f74de3f88 more db unit tests - best o luck !
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m41s
2025-12-06 21:48:27 -08:00
80d2b1ffe6 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.
2025-12-04 15:30:27 -08:00