15 lines
498 B
TypeScript
15 lines
498 B
TypeScript
import { readFile } from "node:fs/promises";
|
|
import path from "node:path";
|
|
|
|
import { expect, test } from "vitest";
|
|
|
|
test("0003 adds a durable voided billing state without deleting usage history", async () => {
|
|
const migration = await readFile(
|
|
path.join(process.cwd(), "drizzle/0003_stream_delivery.sql"),
|
|
"utf8",
|
|
);
|
|
|
|
expect(migration).toContain("ALTER TYPE \"public\".\"usage_billing_status\" ADD VALUE 'voided'");
|
|
expect(migration).not.toMatch(/delete\s+from\s+"?usages"?/i);
|
|
});
|