Spaces:
Runtime error
Runtime error
Removed analytics and trending features, added test and verification result files, and updated existing feature components and tests.
980bfc2 Download src/lib/__tests__/components.test.tsx from dvijaykrishnan/vault-video-processor: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/dvijaykrishnan/vault-video-processor/resolve/main/src/lib/__tests__/components.test.tsx
- Command line
-
hf download hf://spaces/dvijaykrishnan/vault-video-processor/src/lib/__tests__/components.test.tsx
-
curl -L -o components.test.tsx https://huggingface.co/spaces/dvijaykrishnan/vault-video-processor/resolve/main/src/lib/__tests__/components.test.tsx
1.13 kB
| import { describe, it, expect, vi, afterEach } from 'vitest'; | |
| import { render, screen, cleanup } from '@testing-library/react'; | |
| import { SignUpForm } from '../../components/auth/sign-up-form'; | |
| import { SignInForm } from '../../components/auth/sign-in-form'; | |
| afterEach(() => { | |
| cleanup(); | |
| }); | |
| // Mock the auth client since it's used in components | |
| vi.mock('@/lib/auth-client', () => ({ | |
| signIn: { | |
| email: vi.fn(), | |
| }, | |
| signUp: { | |
| email: vi.fn(), | |
| }, | |
| })); | |
| // Mock next/navigation | |
| vi.mock("next/navigation", () => ({ | |
| useRouter: () => ({ | |
| push: vi.fn(), | |
| replace: vi.fn(), | |
| prefetch: vi.fn(), | |
| }), | |
| useSearchParams: () => new URLSearchParams(), | |
| usePathname: () => "/", | |
| })); | |
| describe('Auth Components', () => { | |
| it('should render SignUpForm', () => { | |
| render(<SignUpForm />); | |
| expect(screen.getByRole('button', { name: /continue with google/i })).toBeDefined(); | |
| }); | |
| it('should render SignInForm', () => { | |
| render(<SignInForm />); | |
| expect(screen.getByRole('button', { name: /continue with google/i })).toBeDefined(); | |
| }); | |
| }); | |