mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
test(webview-ui): wrap ChatRow tests with QueryClientProvider to fix 'No QueryClient set' error
This commit is contained in:
parent
1734b67b05
commit
b5a93fe11d
1 changed files with 4 additions and 1 deletions
|
|
@ -1,10 +1,13 @@
|
|||
// npx vitest run src/components/chat/__tests__/ChatRow.spec.tsx
|
||||
|
||||
import { render, screen, fireEvent, waitFor } from "@testing-library/react"
|
||||
import { render as rtlRender, screen, fireEvent, waitFor } from "@testing-library/react"
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
||||
import { describe, it, expect, vi, beforeEach } from "vitest"
|
||||
import { ChatRowContent } from "../ChatRow"
|
||||
import type { ClineMessage } from "@roo-code/types"
|
||||
|
||||
const render = (ui: any) => rtlRender(<QueryClientProvider client={new QueryClient()}>{ui}</QueryClientProvider>)
|
||||
|
||||
// Mock the clipboard utility
|
||||
const mockCopyWithFeedback = vi.fn().mockResolvedValue(true)
|
||||
vi.mock("@src/utils/clipboard", () => ({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue