mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
Couple test-worker arguments to the executable selected by the shared subprocess helper and migrate its runtime-dependent callers. Repair command parsing, runtime pinning, worker observation, storage settlement, and cleanup-clock fixtures while preserving their contracts. Fourteen scoped suites pass on Node 24 and Bun; the Bun readSync gap remains an unchanged stop. Refreshed proof covers 638 passed/1 existing skip on Node and 636 passed/3 existing skips on Bun. P2 review and exact-head ClawSweeper found no actionable defects. Production LOC delta is zero. The first CI head exposed an inherited UI-validator fixture omission. After incorporating its existing main fix, exact-head CI passed, including the published-driver update job. No same-head retry or admin exception was used.
30 lines
1.2 KiB
TypeScript
30 lines
1.2 KiB
TypeScript
import { afterEach, expect, it } from "vitest";
|
|
import { scriptModuleEntrypoints } from "../../scripts/script-module-runtime.test-support.mjs";
|
|
import { resolveRuntimeWorkerUrl } from "../../src/infra/runtime-worker-url.js";
|
|
import { runNodeScript } from "../helpers/run-node-script.js";
|
|
import { useAutoCleanupTempDirTracker } from "../helpers/temp-dir.js";
|
|
|
|
const tempDirs = useAutoCleanupTempDirTracker(afterEach);
|
|
|
|
it("loads installed tooling when the prepared CLI validates native Vitest options", async ({
|
|
signal,
|
|
}) => {
|
|
const directory = tempDirs.make("openclaw-compiled-tooling-");
|
|
const result = await runNodeScript(
|
|
(workerArgv) => [
|
|
...workerArgv(resolveRuntimeWorkerUrl(scriptModuleEntrypoints.testProjects)),
|
|
"test/scripts/test-projects.test.ts",
|
|
"--",
|
|
"--invalid-native-vitest-option",
|
|
],
|
|
{ ...process.env, TMPDIR: directory, TMP: directory, TEMP: directory },
|
|
5_000,
|
|
{ signal, requireProcessTreeExit: process.platform !== "win32" },
|
|
);
|
|
|
|
expect(result.error, result.stderr).toBeUndefined();
|
|
expect(result.status).toBe(1);
|
|
expect(result.stderr).toContain("Unknown option");
|
|
expect(result.stderr).toContain("invalid");
|
|
expect(result.stderr).toContain("[test] starting ");
|
|
});
|