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
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.
This commit is contained in:
@@ -10,7 +10,6 @@ vi.unmock('./recipe.db');
|
||||
const mockQuery = mockPoolInstance.query;
|
||||
import type { Recipe, FavoriteRecipe, RecipeComment } from '../../types';
|
||||
|
||||
import { ForeignKeyConstraintError, NotFoundError } from './errors.db';
|
||||
// Mock the logger to prevent console output during tests. This is a server-side DB test.
|
||||
vi.mock('../logger.server', () => ({
|
||||
logger: {
|
||||
|
||||
Reference in New Issue
Block a user