15 lines
591 B
TypeScript
15 lines
591 B
TypeScript
import { createHash } from "node:crypto";
|
|
import { readFileSync } from "node:fs";
|
|
import { resolve } from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const migrationPath = resolve(process.cwd(), "drizzle/0036_broken_rattler.sql");
|
|
const recordedHash = "3c636f379884a82b48aea91af65532affc0bdd8f6c56fdac35e583c31ce3a8e3";
|
|
|
|
describe("historique Drizzle", () => {
|
|
it("conserve l'empreinte de la migration 0036 déjà enregistrée", () => {
|
|
const hash = createHash("sha256").update(readFileSync(migrationPath)).digest("hex");
|
|
expect(hash).toBe(recordedHash);
|
|
});
|
|
});
|