mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
test: sync stale fixtures and isolate openclaw env tests
Three unrelated test failures surfaced after rebase: - McpFormModal expected the apps boolean set without `hermes`; Hermes MCP support is now wired, so the fixture must include `hermes: false`. - therouter Gemini preset was bumped to `gemini-3.1-pro` in a later commit; update the assertions to match current config. - openclaw_config tests mutate process-level `CC_SWITCH_TEST_HOME` and `HOME` inside a module-local Mutex, but hermes_config does the same under its own separate Mutex. Running both modules in parallel let the env races corrupt hermes_config's `with_test_home`. Tag the four env-mutating openclaw tests with `#[serial]` so they serialize across modules via serial_test's process-wide default key.
This commit is contained in:
@@ -57,10 +57,10 @@ describe("TheRouter provider presets", () => {
|
||||
expect(preset?.category).toBe("aggregator");
|
||||
expect(preset?.endpointCandidates).toEqual(["https://api.therouter.ai"]);
|
||||
expect(preset?.baseURL).toBe("https://api.therouter.ai");
|
||||
expect(preset?.model).toBe("gemini-2.5-pro");
|
||||
expect(preset?.model).toBe("gemini-3.1-pro");
|
||||
|
||||
const env = (preset?.settingsConfig as { env: Record<string, string> }).env;
|
||||
expect(env.GOOGLE_GEMINI_BASE_URL).toBe("https://api.therouter.ai");
|
||||
expect(env.GEMINI_MODEL).toBe("gemini-2.5-pro");
|
||||
expect(env.GEMINI_MODEL).toBe("gemini-3.1-pro");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user