mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-03 01:46:55 +02:00
test: pin every-record outcome counts and the twelve doc-sync callbacks
This commit is contained in:
1 parent
1e640bbfb7
commit
dc640acd8a
2 files changed
+6
-6
No files matched your search
@@ -1183,7 +1183,7 @@ describe('shared-code capture attempt accounting', () => {
|
||||
expect(result.tests.map((row: EvalTestEntry) => row.transcript!.filter(event => event.scenario_name).length))
|
||||
.toEqual([3, 3, 2, 2, 4, 4]);
|
||||
expect(result.total_cost_usd).toBe(0.18);
|
||||
expect(collectorOutcomeCounts([result])).toEqual({ executed: 3, reused: 0, passed: 3, failed: 0, manual_accepted: 0, attempts: 6 });
|
||||
expect(collectorOutcomeCounts([result])).toEqual({ executed: 6, reused: 0, passed: 3, failed: 3, manual_accepted: 0, attempts: 6 });
|
||||
});
|
||||
|
||||
test('missing scenarios in a later attempt cannot inherit an earlier pass', async () => {
|
||||
@@ -1197,7 +1197,7 @@ describe('shared-code capture attempt accounting', () => {
|
||||
})).rejects.toThrow('missing scenarios: second');
|
||||
const result = await finalized(captures);
|
||||
expect(result.tests[1]).toMatchObject({ attempt: 2, passed: false, exit_reason: 'attempt_incomplete' });
|
||||
expect(collectorOutcomeCounts([result])).toEqual({ executed: 1, reused: 0, passed: 0, failed: 1, manual_accepted: 0, attempts: 2 });
|
||||
expect(collectorOutcomeCounts([result])).toEqual({ executed: 2, reused: 0, passed: 1, failed: 1, manual_accepted: 0, attempts: 2 });
|
||||
});
|
||||
|
||||
test('setup, verification and cleanup failures survive even when all recorded captures passed', async () => {
|
||||
@@ -1327,7 +1327,7 @@ test('actual-retry', () => captures.runAttempt('actual-retry', ['audit'], 5_000,
|
||||
const result = JSON.parse(fs.readFileSync(path.join(resultDir, file), 'utf8'));
|
||||
expect(result.tests.map((row: EvalTestEntry) => [row.attempt, row.passed, row.exit_reason]))
|
||||
.toEqual([[1, false, 'timeout'], [2, true, 'success']]);
|
||||
expect(collectorOutcomeCounts([result])).toEqual({ executed: 1, reused: 0, passed: 1, failed: 0, manual_accepted: 0, attempts: 2 });
|
||||
expect(collectorOutcomeCounts([result])).toEqual({ executed: 2, reused: 0, passed: 1, failed: 1, manual_accepted: 0, attempts: 2 });
|
||||
});
|
||||
|
||||
test('Bun outer timeouts stay failed after late completion, with and without a retry', () => {
|
||||
@@ -1369,8 +1369,8 @@ test('outer-timeout', () => captures.runAttempt('outer-timeout', ['audit'], 50,
|
||||
.toEqual(mode === 'retry' ? [[1, false], [2, true]] : [[1, false]]);
|
||||
expect(['timeout', 'attempt_incomplete']).toContain(result.tests[0].exit_reason);
|
||||
expect(result.tests[0].error).toContain('Test attempt stopped:');
|
||||
expect(collectorOutcomeCounts([result])).toEqual({ executed: 1, reused: 0, manual_accepted: 0,
|
||||
passed: mode === 'retry' ? 1 : 0, failed: mode === 'retry' ? 0 : 1, attempts: mode === 'retry' ? 2 : 1 });
|
||||
expect(collectorOutcomeCounts([result])).toEqual({ executed: mode === 'retry' ? 2 : 1, reused: 0, manual_accepted: 0,
|
||||
passed: mode === 'retry' ? 1 : 0, failed: 1, attempts: mode === 'retry' ? 2 : 1 });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user