Skip to content

Commit 8aa211e

Browse files
committed
📝 Clarify that integration tests require bun x jest
Add note to Testing section that tests in tests/ folder must be run with 'bun x jest' (not 'bun test') since they use Jest as the test runner. Unit tests in src/ use bun test, integration tests in tests/ use Jest. Generated with `cmux`
1 parent 4da5eb9 commit 8aa211e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,10 @@ This project uses **Make** as the primary build orchestrator. See `Makefile` for
203203
- utils should be either pure functions or easily isolated (e.g. if they operate on the FS they accept
204204
a path). Testing them should not require complex mocks or setup.
205205
- **Integration tests:**
206+
- **⚠️ IMPORTANT: Use `bun x jest` to run tests in the `tests/` folder** - Integration tests use Jest (not bun test), so you must run them with `bun x jest` or `TEST_INTEGRATION=1 bun x jest`
206207
- Run specific integration test: `TEST_INTEGRATION=1 bun x jest tests/ipcMain/sendMessage.test.ts -t "test name pattern"`
207208
- Run all integration tests: `TEST_INTEGRATION=1 bun x jest tests` (~35 seconds, runs 40 tests)
209+
- Unit tests in `src/` use bun test: `bun test src/path/to/file.test.ts`
208210
- **⚠️ Running `tests/ipcMain` locally takes a very long time.** Prefer running specific test files or use `-t` to filter to specific tests.
209211
- **Performance**: Tests use `test.concurrent()` to run in parallel within each file
210212
- **NEVER bypass IPC in integration tests** - Integration tests must use the real IPC communication paths (e.g., `mockIpcRenderer.invoke()`) even when it's harder. Directly accessing services (HistoryService, PartialService, etc.) or manipulating config/state directly bypasses the integration layer and defeats the purpose of the test.

0 commit comments

Comments
 (0)