feat: major UI/UX overhaul, snippets system, and performance fixes
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Failing after 9m26s

This commit is contained in:
2026-02-16 12:31:40 +01:00
parent 6f62b37c3a
commit a5dba298f3
41 changed files with 1610 additions and 499 deletions

View File

@@ -11,7 +11,7 @@ jest.mock("next-intl", () => ({
// Mock next/image
jest.mock("next/image", () => ({
__esModule: true,
default: (props: any) => <img {...props} />,
default: (props: React.ImgHTMLAttributes<HTMLImageElement>) => <img {...props} alt={props.alt || ""} />,
}));
describe("CurrentlyReading Component", () => {
@@ -28,19 +28,17 @@ describe("CurrentlyReading Component", () => {
it("renders a book when data is fetched", async () => {
const mockBooks = [
{
id: "1",
book_title: "Test Book",
book_author: "Test Author",
book_image: "/test.jpg",
status: "reading",
rating: 5,
progress: 50
title: "Test Book",
authors: ["Test Author"],
image: "/test.jpg",
progress: 50,
startedAt: "2024-01-01"
},
];
(global.fetch as jest.Mock).mockResolvedValue({
ok: true,
json: async () => ({ hardcover: mockBooks }),
json: async () => ({ currentlyReading: mockBooks }),
});
render(<CurrentlyReadingComp />);