mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-04 08:13:30 +08:00
test: round 101 — output() circular crash, getSessionStats type confusion, appendSessionContent null
- output() throws TypeError on circular reference object (JSON.stringify has no try/catch) - getSessionStats(123) throws TypeError (number reaches parseSessionMetadata, .match() fails) - appendSessionContent(null) returns false (TypeError caught by try/catch) Total tests: 863
This commit is contained in:
@@ -1454,6 +1454,19 @@ function runTests() {
|
||||
}
|
||||
})) passed++; else failed++;
|
||||
|
||||
// ── Round 101: output() with circular reference object throws (no try/catch around JSON.stringify) ──
|
||||
console.log('\nRound 101: output() (circular reference — JSON.stringify crash):');
|
||||
if (test('output() throws TypeError on circular reference object (JSON.stringify has no try/catch)', () => {
|
||||
const circular = { a: 1 };
|
||||
circular.self = circular; // Creates circular reference
|
||||
|
||||
assert.throws(
|
||||
() => utils.output(circular),
|
||||
{ name: 'TypeError' },
|
||||
'JSON.stringify of circular object should throw TypeError (no try/catch in output())'
|
||||
);
|
||||
})) passed++; else failed++;
|
||||
|
||||
// Summary
|
||||
console.log('\n=== Test Results ===');
|
||||
console.log(`Passed: ${passed}`);
|
||||
|
||||
Reference in New Issue
Block a user