Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

test(file-manager): give the fixture pi the fs surface hello probes

SeanLiu326d8e1be7f1325
diff --git a/apps/desktop/test/file-manager-directory-location-user-path.e2e.mjs b/apps/desktop/test/file-manager-directory-location-user-path.e2e.mjs
index 332efc6ac..d9e5b6892 100644
--- a/apps/desktop/test/file-manager-directory-location-user-path.e2e.mjs
+++ b/apps/desktop/test/file-manager-directory-location-user-path.e2e.mjs
@@ -227,7 +227,14 @@ const workspace = {
const plugin = require(path.join(workspaceDir, "..", "staged", "pi.file-manager", "main.js"));
globalThis.pi = {
workspace: { get: async () => workspace },
- plugin: { getDataPath: async () => dataDir, getSettings: async () => ({}) },
+ plugin: {
+ getDataPath: async () => dataDir,
+ getSettings: async () => ({}),
+ setSettings: async () => ({}),
+ },
+ // handleHello probes this with a bare typeof; an absent fs would throw and
+ // turn the whole hello (root included) into a failure.
+ fs: {},
};
contextBridge.exposeInMainWorld("pluginBridge", {
diff --git a/apps/desktop/test/file-manager-directory-location.test.mjs b/apps/desktop/test/file-manager-directory-location.test.mjs
index defb5c1f6..1e1919e7c 100644
--- a/apps/desktop/test/file-manager-directory-location.test.mjs
+++ b/apps/desktop/test/file-manager-directory-location.test.mjs
@@ -38,6 +38,8 @@ function withPi(workspace, dataPath, run) {
getDataPath: async () => dataPath,
getSettings: async () => ({}),
},
+ // handleHello probes this with a bare typeof; an absent fs would throw.
+ fs: {},
};
return Promise.resolve()
.then(run)