修复了2个bug

This commit is contained in:
andy committed 2026-09-02 17:02:02 +08:00
1 parent ce8372e878
commit 2a64dc7395
64 files changed
+1050 -39

No files matched your search

+14
View File
@@ -1,7 +1,21 @@
import { readFile } from "node:fs/promises";
import { describe, expect, it } from "vitest";
import { hasCompleteSeedreamLayerMetadata } from "@/lib/seedream/layer-composition";
describe("Seedream layer composition persistence contract", () => {
it("only enables the editable layer project for complete provider layer metadata", () => {
expect(hasCompleteSeedreamLayerMetadata([
{ z_index: 0, size: "2048x2048" },
{ z_index: 1, size: "600x300" }
], 2)).toBe(true);
expect(hasCompleteSeedreamLayerMetadata([
{ size: "2048x2048" },
{ size: "600x300" }
], 2)).toBe(false);
expect(hasCompleteSeedreamLayerMetadata([{ z_index: 0 }], 2)).toBe(false);
expect(hasCompleteSeedreamLayerMetadata([{ z_index: 0 }], 1)).toBe(false);
});
it("ships a versioned PostgreSQL document table that follows generation-job deletion", async () => {
const migration = await readFile(new URL("../database/migrations/0005_seedream_layer_compositions.sql", import.meta.url), "utf8");