Fix sharing

This commit is contained in:
Joey Yakimowich-Payne 2026-01-16 09:42:12 -07:00
commit 3e9a988748
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
6 changed files with 88 additions and 13 deletions

View file

@ -3,7 +3,7 @@ import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { SharedQuizView } from '../../components/SharedQuizView';
import { MemoryRouter, Routes, Route } from 'react-router-dom';
import { MemoryRouter } from 'react-router-dom';
const mockNavigate = vi.fn();
vi.mock('react-router-dom', async () => {
@ -71,9 +71,7 @@ const renderWithRouter = (token: string = 'valid-token') => {
render(
<MemoryRouter initialEntries={[`/shared/${token}`]}>
<Routes>
<Route path="/shared/:token" element={<SharedQuizView onHostQuiz={onHostQuiz} />} />
</Routes>
<SharedQuizView onHostQuiz={onHostQuiz} shareToken={token} />
</MemoryRouter>
);