diff --git a/src/media-understanding/attachments.ssrf.test.ts b/src/media-understanding/media-understanding-misc.test.ts similarity index 53% rename from src/media-understanding/attachments.ssrf.test.ts rename to src/media-understanding/media-understanding-misc.test.ts index 03066fa6371..f33a9ebbeb9 100644 --- a/src/media-understanding/attachments.ssrf.test.ts +++ b/src/media-understanding/media-understanding-misc.test.ts @@ -1,5 +1,22 @@ import { afterEach, describe, expect, it, vi } from "vitest"; import { MediaAttachmentCache } from "./attachments.js"; +import { normalizeMediaUnderstandingChatType, resolveMediaUnderstandingScope } from "./scope.js"; + +describe("media understanding scope", () => { + it("normalizes chatType", () => { + expect(normalizeMediaUnderstandingChatType("channel")).toBe("channel"); + expect(normalizeMediaUnderstandingChatType("dm")).toBe("direct"); + expect(normalizeMediaUnderstandingChatType("room")).toBeUndefined(); + }); + + it("matches channel chatType explicitly", () => { + const scope = { + rules: [{ action: "deny", match: { chatType: "channel" } }], + } as const; + + expect(resolveMediaUnderstandingScope({ scope, chatType: "channel" })).toBe("deny"); + }); +}); const originalFetch = globalThis.fetch; diff --git a/src/media-understanding/scope.test.ts b/src/media-understanding/scope.test.ts deleted file mode 100644 index 0607c4bf2cb..00000000000 --- a/src/media-understanding/scope.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { normalizeMediaUnderstandingChatType, resolveMediaUnderstandingScope } from "./scope.js"; - -describe("media understanding scope", () => { - it("normalizes chatType", () => { - expect(normalizeMediaUnderstandingChatType("channel")).toBe("channel"); - expect(normalizeMediaUnderstandingChatType("dm")).toBe("direct"); - expect(normalizeMediaUnderstandingChatType("room")).toBeUndefined(); - }); - - it("matches channel chatType explicitly", () => { - const scope = { - rules: [{ action: "deny", match: { chatType: "channel" } }], - } as const; - - expect(resolveMediaUnderstandingScope({ scope, chatType: "channel" })).toBe("deny"); - }); -});