mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 22:58:26 +00:00
test: remove low-value mirrored-text media-filename unit case
This commit is contained in:
@@ -16,10 +16,7 @@ import {
|
|||||||
validateSessionId,
|
validateSessionId,
|
||||||
} from "./paths.js";
|
} from "./paths.js";
|
||||||
import { resolveSessionResetPolicy } from "./reset.js";
|
import { resolveSessionResetPolicy } from "./reset.js";
|
||||||
import {
|
import { appendAssistantMessageToSessionTranscript } from "./transcript.js";
|
||||||
appendAssistantMessageToSessionTranscript,
|
|
||||||
resolveMirroredTranscriptText,
|
|
||||||
} from "./transcript.js";
|
|
||||||
|
|
||||||
describe("session path safety", () => {
|
describe("session path safety", () => {
|
||||||
it("rejects unsafe session IDs", () => {
|
it("rejects unsafe session IDs", () => {
|
||||||
@@ -149,16 +146,6 @@ describe("session store lock (Promise chain mutex)", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("resolveMirroredTranscriptText", () => {
|
|
||||||
it("prefers media filenames over text", () => {
|
|
||||||
const result = resolveMirroredTranscriptText({
|
|
||||||
text: "caption here",
|
|
||||||
mediaUrls: ["https://example.com/files/report.pdf?sig=123"],
|
|
||||||
});
|
|
||||||
expect(result).toBe("report.pdf");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("appendAssistantMessageToSessionTranscript", () => {
|
describe("appendAssistantMessageToSessionTranscript", () => {
|
||||||
let tempDir: string;
|
let tempDir: string;
|
||||||
let storePath: string;
|
let storePath: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user