diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-12 21:59:55 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-12 21:59:55 -0800 |
| commit | 2c3cad528a247c771bca136466337877f76f280f (patch) | |
| tree | a2172f49e6142b287b0e2f33c07ed878fb8e449c /frontend/src/App.test.tsx | |
| parent | 42f1b4de384bcbbdab3b80d8e5cc53b36fcffd50 (diff) | |
| download | neko-2c3cad528a247c771bca136466337877f76f280f.tar.gz neko-2c3cad528a247c771bca136466337877f76f280f.tar.bz2 neko-2c3cad528a247c771bca136466337877f76f280f.zip | |
Implement Frontend Feed List with tests
Diffstat (limited to 'frontend/src/App.test.tsx')
| -rw-r--r-- | frontend/src/App.test.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/frontend/src/App.test.tsx b/frontend/src/App.test.tsx index 8e3d805..37a7fab 100644 --- a/frontend/src/App.test.tsx +++ b/frontend/src/App.test.tsx @@ -1,3 +1,5 @@ +import React from 'react'; +import '@testing-library/jest-dom'; import { render, screen, waitFor } from '@testing-library/react'; import App from './App'; import { describe, it, expect, vi, beforeEach } from 'vitest'; @@ -18,15 +20,15 @@ describe('App', () => { }); it('renders dashboard when authenticated', async () => { - (global.fetch as any).mockResolvedValueOnce({ - ok: true, - }); + (global.fetch as any) + .mockResolvedValueOnce({ ok: true }) // /api/auth + .mockResolvedValueOnce({ ok: true, json: async () => [] }); // /api/feed/ window.history.pushState({}, 'Test page', '/v2/'); render(<App />); await waitFor(() => { - expect(screen.getByText(/dashboard/i)).toBeInTheDocument(); + expect(screen.getByText(/neko reader/i)).toBeInTheDocument(); }); }); }); |
