Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: the OpenClaw installer suite skips where npm is absent; the #5312 text test tags its source read
garrytan98500f9aad09
diff --git a/test/backup-private-path-text-5312.test.ts b/test/backup-private-path-text-5312.test.tsindex 9aca5d2b22..cd0402679d 100644--- a/test/backup-private-path-text-5312.test.ts+++ b/test/backup-private-path-text-5312.test.ts@@ -12,6 +12,8 @@ import { expect, test } from 'bun:test';import { readFileSync } from 'node:fs';import { join } from 'node:path';+// test-reads-source-ok[structural]: the row is the refusal's wording and the PowerShell script's shape, both string+// literals that only execute on win32; there is no Linux runtime path that surfaces either.const source = readFileSync(join(import.meta.dir, '..', 'src', 'core', 'backup', 'private-path.ts'), 'utf8');const refusal = source.match(/new AgentInstallError\('private_backup_path_unavailable', (["'])(.*?)\1\)/)?.[2] ?? '';diff --git a/test/scripts/ci-install-openclaw.test.ts b/test/scripts/ci-install-openclaw.test.tsindex e7d060e079..3c0b7bc073 100644--- a/test/scripts/ci-install-openclaw.test.ts+++ b/test/scripts/ci-install-openclaw.test.ts@@ -13,8 +13,11 @@ import { join } from 'node:path';import { STUB_PACKAGE, STUB_VERSION, type StubRegistryOptions, startStubRegistry, stubNpmEnv } from '../helpers/npm-stub-registry.ts';const SCRIPT = join(import.meta.dir, '..', '..', 'scripts', 'ci-install-openclaw.sh');+// The script is an npm install; GitHub's runner images carry npm, a stock Ubicloud CI VM (nodejs without npm) does not.+const NPM = Bun.which('npm');+if (!NPM) console.warn('[ci-install-openclaw] skipped: npm is not on PATH, so the installer script cannot run here');-describe('scripts/ci-install-openclaw.sh', () => {+describe.skipIf(!NPM)('scripts/ci-install-openclaw.sh', () => {const cleanups: Array<() => void> = [];afterEach(() => { for (const cleanup of cleanups.splice(0)) cleanup(); });