Context
pulser currently has zero tests. No test runner, no test files, no test framework in devDependencies. This is the single most impactful contribution you can make.
What to do
- Install
vitest as a devDependency
- Add
"test": "vitest run" to package.json scripts
- Write initial tests for:
src/eval/assertions.ts — 5 assertion types (contains, not-contains, min-length, max-length, matches), all pure functions
src/classifier.ts — skill type classification logic, pure scoring
Why these files first
Both are pure functions with clear inputs and outputs — no filesystem access, no side effects. Perfect for a first test suite.
Example
import { checkAssertion } from './assertions';
test('contains assertion passes when text includes substring', () => {
expect(checkAssertion({ contains: 'hello' }, 'hello world')).toBe(true);
});
test('min-length assertion fails for short text', () => {
expect(checkAssertion({ 'min-length': 50 }, 'short')).toBe(false);
});
Files to modify
package.json (add vitest, test script)
- New:
src/eval/assertions.test.ts
- New:
src/classifier.test.ts
Difficulty: Easy
Context
pulser currently has zero tests. No test runner, no test files, no test framework in devDependencies. This is the single most impactful contribution you can make.
What to do
vitestas a devDependency"test": "vitest run"topackage.jsonscriptssrc/eval/assertions.ts— 5 assertion types (contains,not-contains,min-length,max-length,matches), all pure functionssrc/classifier.ts— skill type classification logic, pure scoringWhy these files first
Both are pure functions with clear inputs and outputs — no filesystem access, no side effects. Perfect for a first test suite.
Example
Files to modify
package.json(add vitest, test script)src/eval/assertions.test.tssrc/classifier.test.tsDifficulty: Easy