- Fix BatchProcessor constructor to avoid server blocking during startup - Add comprehensive integration tests for all modular combinations - Enhance CLAUDE.md documentation with new test commands - Update SelectiveLayers configuration for better LLM allocation - Add AutoReporter system for test automation - Include production workflow validation tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
1015 B
JavaScript
31 lines
1015 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert';
|
|
import { safeImport } from '../_helpers/path.js';
|
|
import { FakeLLMClient } from '../_helpers/fakeLLMClient.js';
|
|
import { AutoReporter } from '../reporters/AutoReporter.js';
|
|
|
|
function skip(msg){ console.warn('[SKIP]', msg); }
|
|
|
|
|
|
// Auto-Reporter Configuration
|
|
const autoReporter = new AutoReporter();
|
|
|
|
test('LLMManager: supports abort/timeout behavior', async () => {
|
|
const res = await safeImport('LLMManager');
|
|
if (!res.ok) { skip(res.reason); return; }
|
|
const L = res.mod;
|
|
|
|
if (typeof L.__setClient !== 'function') { skip('Missing __setClient'); return; }
|
|
|
|
const fake = new FakeLLMClient({ delayMs: 200 });
|
|
L.__setClient('mock', fake);
|
|
|
|
const ac = new AbortController();
|
|
const p = L.callModel({ provider:'mock', model:'fake-1', input:'slow', abortSignal: ac.signal });
|
|
setTimeout(()=> ac.abort(), 50);
|
|
|
|
let aborted = false;
|
|
try { await p; } catch(e){ aborted = true; }
|
|
assert.ok(aborted, 'expected abort to be propagated');
|
|
});
|