Commit Graph

33 Commits

Author SHA1 Message Date
a42ee5a461 unit tests - wheeee! Claude is the mvp
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 15m11s
2026-01-09 21:59:09 -08:00
2564df1c64 get rid of localhost in tests - not a qualified URL - we'll see
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 33m19s
2026-01-05 20:02:44 -08:00
a10f84aa48 complete project using prettier! 2025-12-22 09:45:14 -08:00
391d00ae15 more test fixes
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h8m48s
2025-12-20 19:40:49 -08:00
56981236ab ensure mocks are used wherever possible, more test fixes
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h7m5s
2025-12-20 15:33:08 -08:00
bf4646fbe5 fix ing the mock mock mock !
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h4m27s
2025-12-20 11:50:21 -08:00
a3d3ddd772 mock mock mock !
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 57m50s
2025-12-19 20:31:04 -08:00
e62739810e moar fixes + unit test review of routes
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 57m53s
2025-12-19 14:20:22 -08:00
aa437d6139 moar fixes + unit test review of routes
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 56m46s
2025-12-19 11:20:07 -08:00
c623cddfb5 MORE UNIT TESTS - approc 90% before - 95% now?
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 45m25s
2025-12-17 20:57:28 -08:00
08340a4cf2 Refactor: Introduce requiredString helper for consistent validation across routes and services
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 8m21s
2025-12-15 19:19:23 -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
56f14f6342 feat: Enhance API validation and error handling across routes
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Added tests for invalid request bodies in price and recipe routes.
- Improved type safety in request handlers using Zod schemas.
- Introduced a consistent validation pattern for empty request bodies.
- Enhanced error messages for invalid query parameters in stats and user routes.
- Implemented middleware to inject mock logging for tests.
- Created a custom type for validated requests to streamline type inference.
2025-12-14 12:53:10 -08:00
9757f9dd9f Refactor MainLayout to use new hooks for flyers and master items; consolidate error handling
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
Update error handling tests to ensure proper status assignment for errors
2025-12-14 11:05:04 -08:00
571ca59e82 refactor: Update tests and components for improved type safety and mock handling
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 3h11m16s
2025-12-14 01:38:21 -08:00
728f4a5f7e Refactor useWatchedItems hook to utilize useApi for API calls, update tests accordingly
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 18m15s
- Replaced direct API calls in useWatchedItems with useApi hook for add and remove watched items.
- Updated tests for useWatchedItems to mock useApi and verify API interactions.
- Consolidated error handling for API calls in useWatchedItems.
- Adjusted related hooks and components to ensure compatibility with the new structure.
- Added new ScaleIcon component for UI consistency.
- Implemented useFlyerItems and useFlyers hooks for fetching flyer data.
- Created useMasterItems and useUserData hooks for managing master grocery items and user data.
- Developed useInfiniteQuery hook for handling paginated API responses.
- Added comprehensive tests for useApi and useInfiniteQuery hooks.
- Introduced comparePrices API endpoint and corresponding client-side functionality.
2025-12-13 08:57:15 -08:00
08e73c4ca1 moar unit test !
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 6m6s
2025-12-07 00:30:40 -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
4cf587c8f0 refactor: enhance type safety and functionality in AI routes and tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m27s
2025-12-04 14:54:48 -08:00
2026cb1584 refactor: clean up imports and improve error messages across multiple components
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m28s
2025-12-04 10:58:08 -08:00
8d29ac6b90 comment out road trip planning as it requires google maps api key $$$
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m27s
2025-12-03 21:14:36 -08:00
f91c575142 splitting unit + integration testing apart attempt #1
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 3m44s
2025-12-01 14:39:17 -08:00
897e4531c6 fix some integration tests now that PriceHistoryChart.test.tx is disabled
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 2m53s
2025-11-27 18:31:22 -08:00
eb162fcb52 disable some tests to see if we can narrow down the fuckery
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 3m2s
2025-11-27 17:16:11 -08:00
db373d4606 disable some tests to see if we can narrow down the fuckery
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 2m51s
2025-11-27 17:05:58 -08:00
b0036faa0a get rid of mockImplementation(() => promise) - causing memory leaks
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 37m20s
2025-11-27 11:58:55 -08:00
807c65130a get rid of mockImplementation(() => promise) - causing memory leaks
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 37m26s
2025-11-27 11:00:07 -08:00
e987ec8aea we went to mocks - now going to unit-setup.ts - centralized 2025-11-26 10:28:58 -08:00
3af0183444 ts fixes from reorg + unit test work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 53s
2025-11-25 16:01:06 -08:00
f49d15e449 ts fixes from reorg + unit test work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 56s
2025-11-25 14:36:42 -08:00
ec10834556 ts fixes from reorg + unit test work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 58s
2025-11-25 14:05:15 -08:00
2fdc29e8e8 ts fixes from reorg
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 55s
2025-11-25 12:56:21 -08:00
8968813ee0 file re-org
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 53s
2025-11-25 11:37:41 -08:00