feat: convert tmux monitoring into a plugin (B10)

This commit is contained in:
LukeGus committed 2026-09-23 22:42:56 -05:00
1 parent 79d77678c9
commit 708eedb861
145 files changed
+30308 -4458

No files matched your search

@@ -0,0 +1,44 @@
import { describe, expect, it } from "vitest";
import { tmuxMonitorEnabled } from "../../src/frontend/host-tmux-monitor";
describe("tmuxMonitorEnabled", () => {
it("is false when there is no pluginSettings", () => {
expect(tmuxMonitorEnabled(undefined)).toBe(false);
expect(
tmuxMonitorEnabled({ id: "1", name: "a", ip: "1.2.3.4", port: 22 }),
).toBe(false);
});
it("is false when another plugin's settings are present but not this one's", () => {
expect(
tmuxMonitorEnabled({
id: "1",
name: "a",
ip: "1.2.3.4",
port: 22,
pluginSettings: { tunnels: { enableTunnel: true } },
}),
).toBe(false);
});
it("is true only when enableTmuxMonitor is exactly true", () => {
expect(
tmuxMonitorEnabled({
id: "1",
name: "a",
ip: "1.2.3.4",
port: 22,
pluginSettings: { "tmux-monitor": { enableTmuxMonitor: true } },
}),
).toBe(true);
expect(
tmuxMonitorEnabled({
id: "1",
name: "a",
ip: "1.2.3.4",
port: 22,
pluginSettings: { "tmux-monitor": { enableTmuxMonitor: "true" } },
}),
).toBe(false);
});
});