Affaan Mustafa
2d1e384eef
test: isolate suggest-compact counter fixtures
2026-03-25 03:51:15 -04:00
anthropic-code-agent[bot]
c5ca3c698c
Fix ESLint errors in test files and package-manager.js
...
Co-authored-by: pangerlkr <73515951+pangerlkr@users.noreply.github.com >
2026-02-18 07:04:29 +00:00
Pangerkumzuk Longkumer
2ad888ca82
Refactor console log formatting in tests
2026-02-18 07:21:58 +05:30
Affaan Mustafa
cba6b44c61
test: add 3 tests for suggest-compact, session-aliases, typecheck (Round 64)
...
- suggest-compact: 'default' session ID fallback when CLAUDE_SESSION_ID empty
- session-aliases: loadAliases backfills missing version and metadata fields
- post-edit-typecheck: valid JSON without tool_input passes through unchanged
Total: 797 tests, all passing
2026-02-13 06:59:08 -08:00
Affaan Mustafa
992688a674
fix: add cwd to prettier hook, consistent process.exit(0), and stdout pass-through
...
- post-edit-format.js: add cwd based on file directory so npx resolves
correct local prettier binary
- post-edit-typecheck.js, post-edit-format.js: replace console.log(data)
with process.stdout.write(data) to avoid trailing newline corruption
- Add process.exit(0) to 4 hooks for consistent termination
(check-console-log, post-edit-console-warn, post-edit-format,
post-edit-typecheck)
- run-all.js: switch from execSync to spawnSync so stderr is visible
on the success path (hook warnings were silently discarded)
- Add 21 tests: cwd verification, process.exit(0) checks, exact
stdout pass-through, extension edge cases, exclusion pattern
matching, threshold boundary values (630 → 651)
2026-02-13 03:20:41 -08:00
Affaan Mustafa
253645b5e4
test: add 22 tests for readStdinJson, evaluate-session config, and suggest-compact hook
...
- utils.test.js: 5 tests for readStdinJson maxSize truncation, whitespace-only stdin, trailing whitespace, and BOM prefix handling
- evaluate-session.test.js: 4 tests for config file parsing, assistant-only transcripts, malformed JSON lines, and empty stdin
- suggest-compact.test.js: 13 new tests covering counter file creation/increment, threshold suggestion, interval suggestion, env var handling, corrupted/empty counter files, and session isolation
2026-02-13 03:11:51 -08:00