feat(tooling): enforce indexed access checks in root tests (#105223)

* feat(tooling): enforce indexed access checks in root tests

* style(tooling): clarify scoped package guard
This commit is contained in:
Peter Steinberger
2026-07-12 10:42:07 +01:00
committed by GitHub
parent 251f54baec
commit e0f45bfbf0
55 changed files with 465 additions and 192 deletions

View File

@@ -3,6 +3,7 @@ import { execFileSync, spawnSync } from "node:child_process";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { expectDefined } from "@openclaw/normalization-core";
import { describe, expect, it } from "vitest";
const helperPath = path.resolve("scripts/lib/openclaw-e2e-instance.sh");
@@ -1103,7 +1104,7 @@ exit 1
expect(result.status).toBe(1);
expect(result.stdout).toContain("recent command tail");
expect(result.stdout).not.toContain("DO_NOT_PRINT_OLD_COMMAND_LOG");
const [logFile] = fs.readdirSync(logDir);
const logFile = expectDefined(fs.readdirSync(logDir)[0], "OpenClaw E2E command log file");
expect(fs.readFileSync(path.join(logDir, logFile), "utf8")).toContain(
"DO_NOT_PRINT_OLD_COMMAND_LOG",
);