mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
fix: capture stderr in typecheck hook, add 13 tests for session-end and utils
- post-edit-typecheck.js: capture both stdout and stderr from tsc - hooks.test.js: 7 extractSessionSummary tests (JSONL parsing, array content, malformed lines, empty transcript, long message truncation, env var fallback) - utils.test.js: 6 tests (replaceInFile g-flag behavior, string replace, capture groups, writeFile overwrite, unicode content) Total test count: 294 → 307
This commit is contained in:
@@ -54,7 +54,7 @@ process.stdin.on('end', () => {
|
||||
});
|
||||
} catch (err) {
|
||||
// tsc exits non-zero when there are errors — filter to edited file
|
||||
const output = err.stdout || '';
|
||||
const output = (err.stdout || '') + (err.stderr || '');
|
||||
const relevantLines = output
|
||||
.split('\n')
|
||||
.filter(line => line.includes(filePath) || line.includes(path.basename(filePath)))
|
||||
|
||||
Reference in New Issue
Block a user