fix: improve gateway diagnostics
This commit is contained in:
20
src/daemon/launchd.test.ts
Normal file
20
src/daemon/launchd.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { parseLaunchctlPrint } from "./launchd.js";
|
||||
|
||||
describe("launchd runtime parsing", () => {
|
||||
it("parses state, pid, and exit status", () => {
|
||||
const output = [
|
||||
"state = running",
|
||||
"pid = 4242",
|
||||
"last exit status = 1",
|
||||
"last exit reason = exited",
|
||||
].join("\n");
|
||||
expect(parseLaunchctlPrint(output)).toEqual({
|
||||
state: "running",
|
||||
pid: 4242,
|
||||
lastExitStatus: 1,
|
||||
lastExitReason: "exited",
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user