mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
refactor: Migrate tests from vitest to bun:test and add testing rules
- Convert all test files to use bun:test instead of vitest - Update CLAUDE.md to prohibit vitest, mandate bun:test - Replace vi.fn() with mock() from bun:test - Replace vi.spyOn with spyOn from bun:test - Note: commands.test.ts needs module mocking refactor (TODO) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7ecf67e3dd
commit
288d191320
4 changed files with 47 additions and 80 deletions
|
|
@ -206,6 +206,13 @@ macOS ships bash 3.2. All scripts MUST work on it:
|
|||
- Remote fallback URL: `https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/{path}`
|
||||
- All env vars documented in the cloud's README.md
|
||||
|
||||
## Testing
|
||||
|
||||
- **NEVER use vitest** — use Bun's built-in test runner (`bun:test`) exclusively
|
||||
- Test files go in `cli/src/__tests__/`
|
||||
- Run tests with `bun test`
|
||||
- Use `import { describe, it, expect, beforeEach, afterEach, mock, spyOn } from "bun:test"`
|
||||
|
||||
## Autonomous Loops
|
||||
|
||||
When running autonomous improvement/refactoring loops (`./improve.sh --loop`):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue