mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-13 13:17:55 +02:00
test: cover inferred-window hook output
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user