refactor: migrate test runner from vitest to bun:test #602
Reference in New Issue
Block a user
Delete Branch "refactor/vitest-to-bun-test"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Migrate all 8 packages from vitest to bun:test.
Why
vitest forks Node.js workers but @ocas/core uses bun:sqlite (Bun-only). 21 test suites failed on pre-push.
Changes
Verification
bun run check + bun run test + pre-push all pass.
Closes #601
LGTM ✅
根因正确:vitest fork Node.js workers 但 @ocas/core 用 bun:sqlite,天然不兼容。
迁移干净:vi.spyOn → spyOn,vi.restoreAllMocks → mock.restore(),preload.ts mock process.exit,8 个 vitest.config.ts 清除。
注意合并顺序:#600 先。