-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.setup.ts
More file actions
32 lines (29 loc) · 878 Bytes
/
Copy pathvitest.setup.ts
File metadata and controls
32 lines (29 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import "@testing-library/jest-dom/vitest";
import React from "react";
import { vi } from "vitest";
const Icon = ({ size = 16, ...props }: { size?: number }) =>
React.createElement("svg", {
width: size,
height: size,
"aria-hidden": "true",
...props,
});
vi.mock("lucide-react", () => ({
AlertTriangle: Icon,
CheckCircle2: Icon,
ClipboardCopy: Icon,
Gauge: Icon,
Layers3: Icon,
RotateCcw: Icon,
ShieldCheck: Icon,
Sparkles: Icon,
}));
vi.mock("recharts", () => ({
PolarAngleAxis: () => null,
PolarGrid: () => null,
Radar: () => null,
RadarChart: ({ children }: { children: React.ReactNode }) =>
React.createElement("div", { "data-testid": "radar-chart" }, children),
ResponsiveContainer: ({ children }: { children: React.ReactNode }) =>
React.createElement("div", { "data-testid": "responsive-container" }, children),
}));