mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 13:51:14 -05:00
Refactor: Implement full error logging
This commit is contained in:
@@ -17,7 +17,7 @@ import { useSuperuserGuard } from '@/hooks/useSuperuserGuard';
|
||||
import { IntegrationTestRunner as TestRunner, allTestSuites, type TestResult } from '@/lib/integrationTests';
|
||||
import { Play, Square, Download, ChevronDown, CheckCircle2, XCircle, Clock, SkipForward } from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
import { logger } from '@/lib/logger';
|
||||
import { handleError } from '@/lib/errorHandler';
|
||||
|
||||
export function IntegrationTestRunner() {
|
||||
const superuserGuard = useSuperuserGuard();
|
||||
@@ -67,8 +67,11 @@ export function IntegrationTestRunner() {
|
||||
} else {
|
||||
toast.success(`All ${summary.passed} tests passed!`);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error('Test run error', { error });
|
||||
} catch (error: unknown) {
|
||||
handleError(error, {
|
||||
action: 'Run integration tests',
|
||||
metadata: { suitesCount: suitesToRun.length }
|
||||
});
|
||||
toast.error('Test run failed');
|
||||
} finally {
|
||||
setIsRunning(false);
|
||||
|
||||
Reference in New Issue
Block a user