Refactor tests and services for improved type safety and error handling
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m24s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m24s
- Updated FlyerCorrectionTool tests to remove unused error notification. - Enhanced ProfileManager tests and component to include points in user profile. - Fixed error handling in ProfileManager to correctly log error messages. - Adjusted AI routes tests to ensure proper mocking and added missing properties in mock responses. - Refined AI routes to improve error message extraction and payload handling. - Cleaned up gamification routes tests by removing unnecessary parameters. - Simplified public routes by removing unused parameters in async handlers. - Improved system routes tests to handle exec command callbacks more robustly. - Updated user routes tests to remove unnecessary middleware parameters. - Enhanced AI API client tests to use File objects for simulating uploads. - Modified AI service tests to improve type safety and mock implementations. - Refined database service tests to ensure proper type assertions and mock setups. - Updated express type definitions for better clarity and organization. - Cleaned up notification service tests to mock local re-exports instead of library directly.
This commit is contained in:
@@ -4,7 +4,7 @@ import { render, screen, fireEvent, waitFor } from '@testing-library/react';
|
||||
import { describe, it, expect, vi, beforeEach, type Mocked } from 'vitest';
|
||||
import { FlyerCorrectionTool } from './FlyerCorrectionTool';
|
||||
import * as aiApiClient from '../services/aiApiClient';
|
||||
import { notifyError, notifySuccess } from '../services/notificationService';
|
||||
import { notifySuccess } from '../services/notificationService';
|
||||
|
||||
// Mock dependencies
|
||||
vi.mock('../services/aiApiClient');
|
||||
|
||||
Reference in New Issue
Block a user