Implement testing framework with Vitest, add unit tests for API routes and utility functions, and configure CI workflow for automated testing. Update package dependencies for testing libraries and add test scripts to package.json.
Some checks are pending
CI / test (push) Waiting to run

This commit is contained in:
2025-12-22 12:50:35 -06:00
parent f92b73c7db
commit c7e7d63be5
16 changed files with 3110 additions and 35 deletions

View File

@@ -7,7 +7,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
import { Label } from '@/components/ui/label';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
import { Download, Loader2, Play, Music, Sparkles, Zap, Check } from 'lucide-react';
import { isValidYouTubeUrl } from '@/lib/utils';
import { isValidYouTubeUrl, formatDuration } from '@/lib/utils';
import type { VideoInfo, DownloadResponse, VideoFormat, AudioFormat } from '@/lib/types';
export default function Home() {
@@ -112,12 +112,6 @@ export default function Home() {
}
};
const formatDuration = (seconds: number) => {
const mins = Math.floor(seconds / 60);
const secs = Math.floor(seconds % 60);
return `${mins}:${secs.toString().padStart(2, '0')}`;
};
return (
<div className="min-h-screen relative">
{/* Animated background */}