mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-02-13 14:15:44 +01:00
fix: resolve Prettier markdown code block parsing errors
- Fix syntax errors in skills markdown files (.github/skills, .opencode/skills) - Change typescript to tsx for code blocks with JSX - Replace ellipsis (...) in array examples with valid syntax - Separate CSS from TypeScript into distinct code blocks - Convert JavaScript object examples to valid JSON in docs - Fix enum definitions with proper comma separation
This commit is contained in:
@@ -7,16 +7,21 @@ import { axe, toHaveNoViolations } from "jest-axe";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import UserManagementPage from "@/app/dashboard/users/page";
|
||||
import SessionViewPage from "@/app/dashboard/sessions/[id]/page";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { useParams } from "next/navigation";
|
||||
|
||||
// Extend Jest matchers
|
||||
expect.extend(toHaveNoViolations);
|
||||
|
||||
// Mock auth client
|
||||
const mockUseSession = vi.fn();
|
||||
vi.mock("@/lib/auth/client", () => ({
|
||||
authClient: {
|
||||
useSession: () => mockUseSession(),
|
||||
},
|
||||
}));
|
||||
|
||||
// Mock dependencies
|
||||
vi.mock("next-auth/react");
|
||||
vi.mock("next/navigation");
|
||||
const mockUseSession = vi.mocked(useSession);
|
||||
const mockUseParams = vi.mocked(useParams);
|
||||
|
||||
// Mock fetch
|
||||
@@ -39,8 +44,8 @@ describe("Accessibility Tests", () => {
|
||||
describe("User Management Page Accessibility", () => {
|
||||
beforeEach(() => {
|
||||
mockUseSession.mockReturnValue({
|
||||
data: { user: { role: "ADMIN" } },
|
||||
status: "authenticated",
|
||||
data: { session: { id: "1" }, user: { email: "admin@example.com" } },
|
||||
isPending: false,
|
||||
});
|
||||
|
||||
(global.fetch as any).mockResolvedValue({
|
||||
@@ -183,8 +188,8 @@ describe("Accessibility Tests", () => {
|
||||
describe("Basic Accessibility Compliance", () => {
|
||||
it("should have basic accessibility features", async () => {
|
||||
mockUseSession.mockReturnValue({
|
||||
data: { user: { role: "ADMIN" } },
|
||||
status: "authenticated",
|
||||
data: { session: { id: "1" }, user: { email: "admin@example.com" } },
|
||||
isPending: false,
|
||||
});
|
||||
|
||||
(global.fetch as any).mockResolvedValue({
|
||||
@@ -214,8 +219,8 @@ describe("Accessibility Tests", () => {
|
||||
describe("Interactive Elements", () => {
|
||||
it("should have focusable interactive elements", async () => {
|
||||
mockUseSession.mockReturnValue({
|
||||
data: { user: { role: "ADMIN" } },
|
||||
status: "authenticated",
|
||||
data: { session: { id: "1" }, user: { email: "admin@example.com" } },
|
||||
isPending: false,
|
||||
});
|
||||
|
||||
(global.fetch as any).mockResolvedValue({
|
||||
@@ -246,8 +251,8 @@ describe("Accessibility Tests", () => {
|
||||
describe("Dark Mode Accessibility", () => {
|
||||
beforeEach(() => {
|
||||
mockUseSession.mockReturnValue({
|
||||
data: { user: { role: "ADMIN" } },
|
||||
status: "authenticated",
|
||||
data: { session: { id: "1" }, user: { email: "admin@example.com" } },
|
||||
isPending: false,
|
||||
});
|
||||
|
||||
(global.fetch as any).mockResolvedValue({
|
||||
|
||||
Reference in New Issue
Block a user