26 lines
935 B
JavaScript
26 lines
935 B
JavaScript
import { execFileSync } from "node:child_process";
|
|
import path from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const root = process.cwd();
|
|
const verifierPath = path.join(root, "scripts/verify-cross-cutting-models-complete.mjs");
|
|
|
|
function runVerifier() {
|
|
return execFileSync(process.execPath, [verifierPath], {
|
|
cwd: root,
|
|
encoding: "utf8",
|
|
stdio: ["ignore", "pipe", "pipe"],
|
|
});
|
|
}
|
|
|
|
describe("verify-cross-cutting-models-complete", () => {
|
|
it("passes for the current (complete) TENANT_SCOPED_MODELS registry", () => {
|
|
const out = runVerifier();
|
|
expect(out).toContain("PASS cross-cutting model registry completeness");
|
|
expect(out).toContain("377/377 Prisma models classified");
|
|
expect(out).toContain("Indirect tenant paths: 37 detected, 37 boundary-classified");
|
|
expect(out).toContain("230/230 direct tenantId models registered");
|
|
expect(out).toContain("0 missing");
|
|
});
|
|
});
|