Cleanup, add tests and storybook

This commit is contained in:
adilallo
2026-04-04 10:57:01 -06:00
parent 5d6530e914
commit 427dc44476
26 changed files with 700 additions and 7 deletions
+4 -3
View File
@@ -1,5 +1,5 @@
import "@testing-library/jest-dom/vitest";
import type React from "react";
import React from "react";
import { afterAll, afterEach, beforeAll, vi } from "vitest";
import { cleanup } from "@testing-library/react";
import { server } from "./tests/msw/server";
@@ -18,8 +18,9 @@ vi.mock("next/dynamic", () => {
) => {
// In tests, return a component that immediately resolves and renders
return function DynamicComponent(props: Record<string, unknown>) {
const [Component, setComponent] =
React.useState<React.ComponentType | null>(null);
const [Component, setComponent] = React.useState(
null as React.ComponentType | null,
);
const [loading, setLoading] = React.useState(true);
React.useEffect(() => {