Files
openclaw/src/plugin-sdk/media-runtime.test.ts
VectorPeak fbceb309e7 fix(media): normalize Windows inbound paths case-insensitively
* fix Windows inbound media path casing

* test: cover Windows inbound path casing

* test(plugin-sdk): cover media runtime inbound path casing
2026-07-01 03:53:54 -07:00

20 lines
668 B
TypeScript

/**
* Tests media runtime SDK barrel behavior.
*/
import { describe, expect, it } from "vitest";
import { isInboundPathAllowed, normalizeInboundPathRoots } from "./media-runtime.js";
describe("media-runtime SDK barrel", () => {
it("exposes Windows drive inbound path matching case-insensitively", () => {
const roots = ["d:/users/*/library/messages/attachments"];
expect(normalizeInboundPathRoots(["D:/Users/*/Library/Messages/Attachments"])).toEqual(roots);
expect(
isInboundPathAllowed({
filePath: "D:\\Users\\Alice\\Library\\Messages\\Attachments\\12\\34\\ABCDEF\\IMG_0001.jpeg",
roots,
}),
).toBe(true);
});
});