mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-11 11:57:03 -07:00
debug(evals): add debug logging and exclude nulllinter from vitest
This commit is contained in:
@@ -15,8 +15,8 @@ describe('Related Eval Demonstration', () => {
|
||||
},
|
||||
prompt: 'What is in test.txt?',
|
||||
assert: async (rig: TestRig, result: string) => {
|
||||
// This assertion is designed to fail.
|
||||
expect(result).toContain('THE MODEL WILL NEVER SAY THIS EXACT SENTENCE');
|
||||
// This assertion is GUARANTEED TO FAIL.
|
||||
expect(1).toBe(2);
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -21,6 +21,7 @@ export default defineConfig({
|
||||
json: 'evals/logs/report.json',
|
||||
},
|
||||
include: ['**/*.eval.ts'],
|
||||
exclude: ['**/node_modules/**', '**/dist/**', '**/nulllinter/**'],
|
||||
environment: 'node',
|
||||
globals: true,
|
||||
alias: {
|
||||
|
||||
@@ -245,12 +245,17 @@ async function processResults(firstPass, pattern, model, files) {
|
||||
let totalProcessed = 0;
|
||||
|
||||
for (const fileResult of firstPass.testResults) {
|
||||
console.log(`\nDebug: Processing file ${fileResult.name}`);
|
||||
for (const assertion of fileResult.assertionResults) {
|
||||
if (assertion.status !== 'passed' && assertion.status !== 'failed') {
|
||||
console.log(
|
||||
` - Skipping test: ${assertion.title} (status: ${assertion.status})`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
const name = assertion.title;
|
||||
console.log(` - Test: ${name} (status: ${assertion.status})`);
|
||||
results[name] = {
|
||||
passed: assertion.status === 'passed' ? 1 : 0,
|
||||
total: 1,
|
||||
|
||||
Reference in New Issue
Block a user