Skip to content

Commit 9b8f571

Browse files
committed
test(memory-wiki): handle FileHandle read paths
1 parent 53fe830 commit 9b8f571

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎extensions/memory-wiki/src/query.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,12 @@ describe("searchMemoryWiki", () => {
288288
let filePath: string;
289289
if (typeof file === "string") {
290290
filePath = file;
291+
} else if (file instanceof URL) {
292+
filePath = file.pathname;
291293
} else if (Buffer.isBuffer(file)) {
292294
filePath = file.toString("utf8");
293295
} else {
294-
filePath = file.pathname;
296+
return originalReadFile(file, encoding as BufferEncoding);
295297
}
296298
if (!filePath.includes(`${path.sep}sources${path.sep}page-`)) {
297299
return originalReadFile(file, encoding as BufferEncoding);

0 commit comments

Comments
 (0)