test: cover inferred-window hook output

This commit is contained in:
haelyra
2026-08-29 14:55:13 -04:00
parent ecdd517765
commit 2f8a5a271d
2 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -694,7 +694,7 @@ function runTests() {
};
}
if (test('suggests compact when context exceeds the 200k-window threshold', () => {
if (test('omits the percentage when the context window is assumed', () => {
const ctx = createContextContext();
const transcript = writeTranscriptFixture(170000);
try {
@@ -704,7 +704,7 @@ function runTests() {
const parsed = JSON.parse(result.stdout);
const context = parsed.hookSpecificOutput.additionalContext;
assert.ok(context.includes('Context ~170k tokens'), `Expected token estimate. Got: ${context}`);
assert.ok(context.includes('85% of 200k window'), `Expected window percentage. Got: ${context}`);
assert.ok(!context.includes('% of'), `Expected no percentage for an assumed window. Got: ${context}`);
} finally {
try { fs.unlinkSync(transcript); } catch (_err) { /* ignore */ }
ctx.cleanup();