Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: the unknown --skill-loading refusal exits 1 before any mcp add
garrytan3d6bb2b75eb9
diff --git a/test/connect.test.ts b/test/connect.test.tsindex 1618a89b8b..48713e2a7d 100644--- a/test/connect.test.ts+++ b/test/connect.test.ts@@ -538,13 +538,18 @@ describe('runConnect --install', () => {test('an unknown --skill-loading value is refused before anything is installed', async () => {const seen: unknown[] = [];+ const ran: string[][] = [];const r = await runWithExitCapture(['https://brain.example.com/mcp', '--token', 'gbrain_tok', '--install', '--yes', '--skill-loading', 'always'],- installDeps({ writeInstructions: (...a) => { seen.push(a); return null; } }),+ installDeps({+ writeInstructions: (...a) => { seen.push(a); return null; },+ runBinary: (_binary, argv) => { ran.push(argv); return { code: 0, stdout: '', stderr: '' }; },+ }),);- expect(r.exitCode).not.toBe(0);+ expect(r.exitCode).toBe(1);expect(r.err.join('\n')).toContain("Unknown --skill-loading 'always'");expect(seen).toEqual([]);+ expect(ran).toEqual([]);});test('probe failure warns + exits 1 + never echoes the token', async () => {