mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 18:50:42 +00:00
test: tighten assertions and harness coverage
This commit is contained in:
@@ -21,9 +21,11 @@ describe("restart-helper", () => {
|
||||
|
||||
async function prepareAndReadScript(env: Record<string, string>, gatewayPort = 18789) {
|
||||
const scriptPath = await prepareRestartScript(env, gatewayPort);
|
||||
expect(scriptPath).toBeTruthy();
|
||||
const content = await fs.readFile(scriptPath!, "utf-8");
|
||||
return { scriptPath: scriptPath!, content };
|
||||
if (scriptPath === undefined) {
|
||||
throw new Error("expected restart script path");
|
||||
}
|
||||
const content = await fs.readFile(scriptPath, "utf-8");
|
||||
return { scriptPath, content };
|
||||
}
|
||||
|
||||
async function cleanupScript(scriptPath: string) {
|
||||
|
||||
Reference in New Issue
Block a user