Skip to content

Commit 9fa5f70

Browse files
committed
refactor: simplify tests folder structure
- Flatten tests/integration/ipc/ to tests/ipc/ - Move tests/models/knownModels.test.ts to src/common/constants/ (colocate with implementation) - Delete orphan tests/worker-test.test.ts - Update CI to run tests/ipc + tests/runtime (fixes runtime tests not running) - Update paths-filter backend filter for new structure Tests philosophy: unit tests colocated in src/, integration tests in tests/
1 parent f371a13 commit 9fa5f70

40 files changed

+5
-16
lines changed

.github/workflows/pr.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ jobs:
5151
- 'src/cli/**'
5252
- 'src/desktop/**'
5353
- 'src/common/**'
54-
- 'tests/integration/**'
54+
- 'tests/ipc/**'
55+
- 'tests/runtime/**'
5556
config:
5657
- '.github/**'
5758
- 'jest.config.cjs'
@@ -122,7 +123,7 @@ jobs:
122123
fetch-depth: 0
123124
- uses: ./.github/actions/setup-mux
124125
- run: make build-main
125-
- run: TEST_INTEGRATION=1 bun x jest --coverage --maxWorkers=100% --silent ${{ github.event.inputs.test_filter || 'tests' }}
126+
- run: TEST_INTEGRATION=1 bun x jest --coverage --maxWorkers=100% --silent ${{ github.event.inputs.test_filter || 'tests/ipc tests/runtime' }}
126127
env:
127128
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
128129
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

docs/system-prompt.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,4 @@ You are in a git worktree at ${workspacePath}
6262
}
6363
```
6464

65-
6665
{/* END SYSTEM_PROMPT_DOCS */}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe("Known Models Integration", () => {
4141
const lookupKey = model.provider === "xai" ? `xai/${modelId}` : modelId;
4242
const modelData =
4343
(modelsJson[lookupKey as keyof typeof modelsJson] as Record<string, unknown>) ??
44-
(modelsExtra[modelId as keyof typeof modelsExtra] as unknown as Record<string, unknown>);
44+
(modelsExtra[modelId] as Record<string, unknown>);
4545

4646
expect(modelData).toBeDefined();
4747
// Check that basic metadata fields exist (not all models have all fields)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)