mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-12 08:22:29 +02: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:
parent
e9f0f1334f
commit
b1b28f2f92
3 changed files with 212 additions and 1 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue