mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-01 06:23:28 +08:00
test: isolate loop-status missing transcript fixture
This commit is contained in:
committed by
Affaan Mustafa
parent
7b03a60503
commit
85dfb5e5fc
@@ -435,13 +435,18 @@ function runTests() {
|
|||||||
})) passed++; else failed++;
|
})) passed++; else failed++;
|
||||||
|
|
||||||
if (test('exit-code mode returns 1 for scan errors without attention signals', () => {
|
if (test('exit-code mode returns 1 for scan errors without attention signals', () => {
|
||||||
const missingTranscript = path.join(os.tmpdir(), 'ecc-loop-status-missing.jsonl');
|
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ecc-loop-status-missing-'));
|
||||||
|
const missingTranscript = path.join(tempDir, 'missing.jsonl');
|
||||||
const result = run(['--transcript', missingTranscript, '--now', NOW, '--json', '--exit-code']);
|
const result = run(['--transcript', missingTranscript, '--now', NOW, '--json', '--exit-code']);
|
||||||
|
|
||||||
assert.strictEqual(result.code, 1, result.stderr);
|
try {
|
||||||
const payload = parsePayload(result.stdout);
|
assert.strictEqual(result.code, 1, result.stderr);
|
||||||
assert.strictEqual(payload.sessions.length, 0);
|
const payload = parsePayload(result.stdout);
|
||||||
assert.strictEqual(payload.errors.length, 1);
|
assert.strictEqual(payload.sessions.length, 0);
|
||||||
|
assert.strictEqual(payload.errors.length, 1);
|
||||||
|
} finally {
|
||||||
|
fs.rmSync(tempDir, { recursive: true, force: true });
|
||||||
|
}
|
||||||
})) passed++; else failed++;
|
})) passed++; else failed++;
|
||||||
|
|
||||||
if (test('exit-code mode rejects unbounded watch mode', () => {
|
if (test('exit-code mode rejects unbounded watch mode', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user