test: mock readPaperclipRuntimeSkillEntries to eliminate real fs I/O under fake timers
Previously the test suite relied on real fs.stat completing within the fake timer advance window (~11200ms). Under CI with 11 parallel test files the I/O could drain later than the advances allowed, causing a 1-in-4 timeout on the "logs pod pending" test. Fix: mock @paperclipai/adapter-utils/server-utils using vi.hoisted() + Object.assign so readPaperclipRuntimeSkillEntries resolves immediately as a microtask. All other exports are forwarded to the real module via importOriginal. Each beforeEach that calls vi.resetAllMocks() or vi.clearAllMocks() now also calls mockReadSkillEntries.mockResolvedValue([]) to restore the implementation. Timer advances in affected tests are simplified to reflect the purely fake-timer sequence (no I/O drain prefix). All 323 tests pass deterministically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "paperclip-adapter-claude-k8s",
|
||||
"version": "0.1.35",
|
||||
"version": "0.1.36",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "paperclip-adapter-claude-k8s",
|
||||
"version": "0.1.35",
|
||||
"version": "0.1.36",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@kubernetes/client-node": "^1.0.0",
|
||||
|
||||
Reference in New Issue
Block a user