harden installers rendering and dependency hygiene
This commit is contained in:
9
tests/pi-launch.test.ts
Normal file
9
tests/pi-launch.test.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
|
||||
import { exitCodeFromSignal } from "../src/pi/launch.js";
|
||||
|
||||
test("exitCodeFromSignal maps POSIX signals to conventional shell exit codes", () => {
|
||||
assert.equal(exitCodeFromSignal("SIGTERM"), 143);
|
||||
assert.equal(exitCodeFromSignal("SIGSEGV"), 139);
|
||||
});
|
||||
@@ -18,6 +18,10 @@ test("loadPiWebAccessConfig returns empty config when Pi web config is missing",
|
||||
assert.deepEqual(loadPiWebAccessConfig(configPath), {});
|
||||
});
|
||||
|
||||
test("getPiWebSearchConfigPath respects FEYNMAN_HOME semantics", () => {
|
||||
assert.equal(getPiWebSearchConfigPath("/tmp/custom-home"), "/tmp/custom-home/.feynman/web-search.json");
|
||||
});
|
||||
|
||||
test("getPiWebAccessStatus reads Pi web-access config directly", () => {
|
||||
const root = mkdtempSync(join(tmpdir(), "feynman-pi-web-"));
|
||||
const configPath = getPiWebSearchConfigPath(root);
|
||||
|
||||
Reference in New Issue
Block a user