feat(ai-tools): install/update AI CLIs, remote catalog sync, cached favicons (#40 A2)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
const { describe, it, beforeEach, afterEach } = require("node:test");
|
||||
const assert = require("node:assert/strict");
|
||||
const { hydrateShellPath } = require("../lib/shell-path");
|
||||
const { hydrateShellPath, shellPath } = require("../lib/shell-path");
|
||||
|
||||
const M = "__AGENTHUB_PATH__";
|
||||
const stub =
|
||||
@@ -38,6 +38,11 @@ describe("hydrateShellPath", () => {
|
||||
assert.equal(process.env.PATH, "/usr/bin:/bin:/home/u/.local/bin:/opt/x");
|
||||
});
|
||||
|
||||
it("remembers the shell's own PATH in the shell's order", async () => {
|
||||
await hydrateShellPath({ spawn: stub(`${M}/home/u/.nvm/bin:/usr/bin${M}`) });
|
||||
assert.equal(shellPath(), "/home/u/.nvm/bin:/usr/bin");
|
||||
});
|
||||
|
||||
it("keeps PATH on error or missing delimiters", async () => {
|
||||
assert.equal(await hydrateShellPath({ spawn: stub("", new Error("timeout")) }), false);
|
||||
assert.equal(await hydrateShellPath({ spawn: stub("no markers") }), false);
|
||||
|
||||
Reference in New Issue
Block a user