import { beforeAll, describe, expect, it, vi } from "vitest" ;
const resolveGatewayLogPathsMock = vi.fn(() => ({
logDir: "C:\\tmp\\openclaw-state\\logs" ,
stdoutPath: "C:\\tmp\\openclaw-state\\logs\\gateway.log" ,
stderrPath: "C:\\tmp\\openclaw-state\\logs\\gateway.err.log" ,
}));
const resolveGatewayRestartLogPathMock = vi.fn(
() => "C:\\tmp\\openclaw-state\\logs\\gateway-restart.log" ,
);
vi.mock("./restart-logs.js" , () => ({
resolveGatewayLogPaths: resolveGatewayLogPathsMock,
resolveGatewayRestartLogPath: resolveGatewayRestartLogPathMock,
}));
let buildPlatformRuntimeLogHints: typeof import ("./runtime-hints.js" ).buildPlatformRuntimeLogHints;
describe("buildPlatformRuntimeLogHints" , () => {
beforeAll(async () => {
({ buildPlatformRuntimeLogHints } = await import ("./runtime-hints.js" ));
});
it("strips windows drive prefixes from darwin display paths" , () => {
expect(
buildPlatformRuntimeLogHints({
platform: "darwin" ,
systemdServiceName: "openclaw-gateway" ,
windowsTaskName: "OpenClaw Gateway" ,
}),
).toEqual([
"Launchd stdout (if installed): /tmp/openclaw-state/logs/gateway.log" ,
"Launchd stderr (if installed): /tmp/openclaw-state/logs/gateway.err.log" ,
"Restart attempts: /tmp/openclaw-state/logs/gateway-restart.log" ,
]);
});
});
Messung V0.5 in Prozent C=97 H=95 G=95
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-05)
¤
*© Formatika GbR, Deutschland