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,23 @@
|
||||
// @vitest-environment node
|
||||
import { readFileSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
||||
const editorSource = readFileSync(path.join(moduleDir, "ui/editor/index.tsx"), "utf8");
|
||||
const slashCommandSource = readFileSync(path.join(moduleDir, "ui/editor/extensions/slash-command.tsx"), "utf8");
|
||||
const uploadSource = readFileSync(path.join(moduleDir, "lib/utils/editor.ts"), "utf8");
|
||||
|
||||
describe("Novel editor routing", () => {
|
||||
it("does not target disabled internal AI routes from active editor UI", () => {
|
||||
expect(editorSource).not.toContain("internal/ai/generate");
|
||||
expect(slashCommandSource).not.toContain("internal/ai/generate");
|
||||
expect(uploadSource).not.toContain("internal/ai/upload");
|
||||
});
|
||||
|
||||
it("uploads through the canonical API host with tenant scope", () => {
|
||||
expect(uploadSource).toContain('apiPath("ai/upload"');
|
||||
expect(uploadSource).toContain('"x-tenant-id": tenantId');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user