Commit db9ecdb
authored
🤖 ci: reorganize integration tests (#716)
_Generated with `mux`_
Refactors the `sendMessage` integration test suite for better
organization, maintainability, and performance.
## Changes
### Test Organization
Split monolithic `sendMessage.test.ts` (1628 lines) into 5 thematic
files:
- `sendMessage.basic.test.ts` — core send/receive, interrupt,
reconnection
- `sendMessage.context.test.ts` — editing, history truncation,
multi-turn conversations
- `sendMessage.errors.test.ts` — validation, API key errors, model not
found
- `sendMessage.heavy.test.ts` — context limit / auto-truncation
- `sendMessage.images.test.ts` — vision model tests
### Shared Workspace Helper
Added `sendMessageTestHelpers.ts` with:
- `withSharedWorkspace(provider, testFn)` — creates one git repo per
test file instead of per-test
- `withSharedWorkspaceNoProvider(testFn)` — for tests that verify
behavior without provider config
### Setup Improvements
- `setupWorkspace` and `setupWorkspaceWithoutProvider` now accept
optional `existingRepoPath` for repo reuse
- `buildLargeHistory` writes directly to `chat.jsonl` instead of
sequential appends (30s → <1s)
## Results
- Better test isolation and faster failure diagnosis
- Reduced I/O overhead from shared git repo pattern
- Prevents CI timeouts from monolithic test file1 parent 75c93e7 commit db9ecdb
File tree
9 files changed
+1883
-1660
lines changed- tests/ipcMain
9 files changed
+1883
-1660
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| |||
769 | 779 | | |
770 | 780 | | |
771 | 781 | | |
772 | | - | |
| 782 | + | |
| 783 | + | |
773 | 784 | | |
774 | 785 | | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | 786 | | |
779 | 787 | | |
780 | 788 | | |
781 | 789 | | |
782 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
783 | 795 | | |
784 | 796 | | |
785 | 797 | | |
786 | 798 | | |
787 | 799 | | |
788 | 800 | | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
| 801 | + | |
794 | 802 | | |
795 | | - | |
796 | 803 | | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
805 | 807 | | |
0 commit comments