Añadido Dockerfil docker-compose.yml

This commit is contained in:
2026-05-30 21:47:44 -05:00
parent 40986b0359
commit 5a563b214f
101 changed files with 10207 additions and 950 deletions
+42
View File
@@ -0,0 +1,42 @@
import "@testing-library/jest-dom/vitest";
import { vi } from "vitest";
// ─── Global test setup ─────────────────────────────────────────────────────
// Mock next/navigation
vi.mock("next/navigation", () => ({
useRouter: () => ({
push: vi.fn(),
refresh: vi.fn(),
replace: vi.fn(),
back: vi.fn(),
forward: vi.fn(),
prefetch: vi.fn(),
}),
usePathname: () => "/dashboard/calendar",
redirect: vi.fn(),
}));
// Mock next/headers (server-only)
vi.mock("next/headers", () => ({
cookies: () =>
Promise.resolve({
getAll: () => [],
set: vi.fn(),
get: () => undefined,
}),
}));
// Suppress console.error in tests unless explicitly testing error paths
const originalConsoleError = console.error;
console.error = (...args: unknown[]) => {
// Filter out known React warnings in test environment
const msg = String(args[0] ?? "");
if (
msg.includes("Warning: ReactDOMTestUtils.act") ||
msg.includes("not wrapped in act")
) {
return;
}
originalConsoleError(...args);
};