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
Some checks are pending
CI / test (push) Waiting to run
This commit is contained in:
@@ -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 */}
|
||||
|
||||
Reference in New Issue
Block a user