Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ ponytail-*.gif

# agentic benchmark workspaces (agent output, kept locally for inspection)
benchmarks/agentic/runs/

# kbcode knowledge base (local agent context, not repo content)
kb/
12 changes: 11 additions & 1 deletion tests/correctness.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@

const test = require('node:test');
const assert = require('node:assert/strict');
const { execSync } = require('node:child_process');
const correctness = require('../benchmarks/correctness');

// CSV checks need pandas installed locally; skip the pandas-dependent test when
// it's absent so `npm test` is green on a fresh clone without the optional dep.
let hasPandas = false;
try {
const probe = process.platform === 'win32' ? 'python -c "import pandas"' : 'python3 -c "import pandas"';
execSync(probe, { stdio: 'pipe' });
hasPandas = true;
} catch (_) {}

// Helper: wrap code in a fenced block and call the assertion with task vars.
function check(task, lang, code) {
const output = '```' + lang + '\n' + code + '\n```';
Expand Down Expand Up @@ -74,7 +84,7 @@ test('debounce: immediate-call implementation fails', () => {

// --- CSV sum ---

test('csv: correct pandas one-liner passes', () => {
(hasPandas ? test : test.skip)('csv: correct pandas one-liner passes', () => {
const result = check(
"Write Python code that reads sales.csv and sums the 'amount' column.",
'python',
Expand Down