mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 02:13:41 +00:00
- Extract PEN encoding logic into separate testable module (penEncoder.ts) - Implement 24 comprehensive tests covering: - Position encoding and coordinate shifting - Lock stitch direction calculation (forward/backward) - Lock stitch generation with rotation - Full PEN encoding with color changes, jumps, and bounds - Edge cases (empty arrays, single stitches, TRIM flags) - Setup vitest for testing - Refactor pattern converter worker to use extracted penEncoder module - Fix bounds calculation to include non-MOVE stitches (not just STITCH) - Remove duplicate function definitions from worker - Add test scripts: npm run test, npm run test:ui, npm run test:run All tests passing (24/24) and build successful. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
9 lines
187 B
TypeScript
9 lines
187 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
},
|
|
});
|