mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-09-30 12:39:42 +02:00
4.7 KiB
4.7 KiB
> claudeman@0.1490 test
> vitest run test/state-store.test.ts
RUN v4.0.18 /home/arkon/default/claudeman
❯ test/state-store.test.ts (33 tests | 1 failed) 57ms
✓ should create initial state when no file exists 6ms
✓ should set state file path in config 2ms
× should debounce saves by default 15ms
✓ should write immediately with saveNow 2ms
✓ should flush pending saves 1ms
✓ should set and get sessions 1ms
✓ should return null for non-existent session 1ms
✓ should remove sessions 1ms
✓ should get all sessions 2ms
✓ should set and get tasks 1ms
✓ should return null for non-existent task 1ms
✓ should remove tasks 1ms
✓ should get all tasks 1ms
✓ should get and set Ralph Loop state 1ms
✓ should merge partial updates 1ms
✓ should get and set config 1ms
✓ should merge partial updates 1ms
✓ should reset state to initial values 1ms
✓ should preserve state file path in config 1ms
✓ should get and set ralph state 1ms
✓ should return null for non-existent ralph state 1ms
✓ should update ralph state with partial merge 1ms
✓ should create initial state on update if none exists 1ms
✓ should remove ralph state 1ms
✓ should get all ralph states 1ms
✓ should flush both main and ralph state 2ms
✓ should persist and restore state across instances 2ms
✓ should initialize global stats with zero values 1ms
✓ should add to global stats 1ms
✓ should accumulate global stats across multiple calls 1ms
✓ should increment sessions created counter 1ms
✓ should compute aggregate stats combining global and active sessions 1ms
✓ should persist global stats across instances 1ms
stderr | StateStore.saveNowAsync (/home/arkon/default/claudeman/src/state-store.ts:190:15)
[StateStore] Failed to write state file: Error: ENOENT: no such file or directory, open '/tmp/claudeman-test-1770917629701/state.json.tmp'
at open (node:internal/fs/promises:636:25)
at writeFile (node:internal/fs/promises:1205:14)
at StateStore.saveNowAsync (/home/arkon/default/claudeman/src/state-store.ts:180:7) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/tmp/claudeman-test-1770917629701/state.json.tmp'
}
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
FAIL test/state-store.test.ts > StateStore > save and saveNow > should debounce saves by default
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ test/state-store.test.ts:84:40
82|
83| // Now file should exist
84| expect(existsSync(testFilePath)).toBe(true);
| ^
85| });
86|
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed (1)
Tests 1 failed | 32 passed (33)
Start at 18:33:49
Duration 625ms (transform 207ms, setup 49ms, import 219ms, tests 57ms, environment 0ms)