Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,47 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { describe, it } from "vitest";
|
||||
|
||||
import { gates, shellCommand } from "./verify-auth-api-body-baseline.mjs";
|
||||
|
||||
const requiredTestPaths = [
|
||||
"apps/api/src/auth.test.ts",
|
||||
"apps/api/src/app.test.ts",
|
||||
"apps/api/src/middleware/body-limit.test.ts",
|
||||
"apps/api/src/middleware/request-id.test.ts",
|
||||
"apps/web/app/routes/session-entry.host-aware.test.ts",
|
||||
"root.theme-preference.test.tsx",
|
||||
];
|
||||
|
||||
const forbiddenCommandPatterns = [/playwright/i, /cypress/i, /test:e2e/i, /^pnpm test$/i];
|
||||
|
||||
describe("verify-auth-api-body-baseline", () => {
|
||||
it("defines a focused non-watch auth/API/body-limit baseline inventory", () => {
|
||||
assert.deepEqual(
|
||||
gates.map((gate) => [gate.label, gate.command, gate.args]),
|
||||
[
|
||||
["TypeScript/static health", "pnpm", ["run", "typecheck"]],
|
||||
[
|
||||
"Focused auth/API/body-limit Vitest surfaces",
|
||||
"pnpm",
|
||||
["exec", "vitest", "run", ...requiredTestPaths],
|
||||
],
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps the command inventory non-E2E and non-browser", () => {
|
||||
const commandText = gates.map((gate) => shellCommand(gate)).join("\n");
|
||||
|
||||
for (const forbiddenPattern of forbiddenCommandPatterns) {
|
||||
assert.doesNotMatch(commandText, forbiddenPattern);
|
||||
}
|
||||
});
|
||||
|
||||
it("includes the Auth API Body-relevant auth, API, request-id, and body-limit test paths", () => {
|
||||
const commandText = gates.map((gate) => shellCommand(gate)).join("\n");
|
||||
|
||||
for (const testPath of requiredTestPaths) {
|
||||
assert.match(commandText, new RegExp(testPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")));
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user