29 lines
1.2 KiB
JavaScript
29 lines
1.2 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { readFile } from "node:fs/promises";
|
|
import test from "node:test";
|
|
|
|
test("ships a v5 Noctalia compatibility launcher instead of a primary panel", async () => {
|
|
const [manifest, bridge] = await Promise.all([
|
|
readFile("noctalia-v5-plugin/pi-status-bridge/plugin.toml", "utf8"),
|
|
readFile("noctalia-v5-plugin/pi-status-bridge/bridge.luau", "utf8"),
|
|
]);
|
|
|
|
assert.doesNotMatch(manifest, /\[\[panel\]\]/);
|
|
assert.match(manifest, /entry = "bridge\.luau"/);
|
|
assert.match(bridge, /PI_STATUS_UI_BINARY/);
|
|
assert.match(bridge, /pi-status-ui/);
|
|
assert.match(bridge, /noctalia\.runAsync/);
|
|
assert.match(bridge, /test -x/);
|
|
assert.match(bridge, /setsid -f env TMPDIR=\/tmp/);
|
|
assert.match(bridge, /--toggle/);
|
|
assert.doesNotMatch(bridge, /--show/);
|
|
assert.match(bridge, /pi-status-ui\.log/);
|
|
assert.doesNotMatch(bridge, /togglePanel/);
|
|
assert.match(bridge, /Pi reconnecting/);
|
|
assert.match(bridge, /discover_home_agent\(socket\)/);
|
|
assert.match(bridge, /systemctl --user start pi-status-bridge\.service/);
|
|
assert.match(bridge, /bridge_start_in_flight/);
|
|
assert.match(bridge, /pending_ui_open/);
|
|
assert.match(bridge, /Bridge is starting/);
|
|
});
|