-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathvitest.config.ts
More file actions
72 lines (68 loc) · 2.97 KB
/
Copy pathvitest.config.ts
File metadata and controls
72 lines (68 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { defineConfig } from "vitest/config";
const integrationTestTimeout = process.platform === "win32" ? 60000 : 30000;
const isInProcessTransport =
(process.env.COPILOT_SDK_DEFAULT_CONNECTION ?? "").toLowerCase() === "inprocess";
// TODO(cli-1.0.81-2): CLI 1.0.81-5 still stops completing model-driven turns when
// hosted in-process against CAPI. The shared runtime then poisons every later
// model-driven test. These suites still run over stdio on all three OSes, while
// pure-RPC in-process coverage remains enabled.
const inProcessBlockedE2E = [
"**/test/e2e/abort.e2e.test.ts",
"**/test/e2e/agent_and_compact_rpc.e2e.test.ts",
"**/test/e2e/ask_user.e2e.test.ts",
"**/test/e2e/builtin_tools.e2e.test.ts",
"**/test/e2e/client_api.e2e.test.ts",
"**/test/e2e/client_lifecycle.e2e.test.ts",
"**/test/e2e/compaction.e2e.test.ts",
"**/test/e2e/copilot_request_cancel_error.e2e.test.ts",
"**/test/e2e/copilot_request_handler.e2e.test.ts",
"**/test/e2e/copilot_request_session_id.e2e.test.ts",
"**/test/e2e/disabled_mcp_servers.e2e.test.ts",
"**/test/e2e/event_fidelity.e2e.test.ts",
"**/test/e2e/hooks.e2e.test.ts",
"**/test/e2e/hooks_extended.e2e.test.ts",
"**/test/e2e/mcp_and_agents.e2e.test.ts",
"**/test/e2e/mode_empty.e2e.test.ts",
"**/test/e2e/multi_turn.e2e.test.ts",
"**/test/e2e/permissions.e2e.test.ts",
"**/test/e2e/pre_mcp_tool_call_hook.e2e.test.ts",
"**/test/e2e/provider_endpoint.e2e.test.ts",
"**/test/e2e/rewind.e2e.test.ts",
"**/test/e2e/rpc_event_side_effects.e2e.test.ts",
"**/test/e2e/rpc_session_state.e2e.test.ts",
"**/test/e2e/rpc_session_state_extras.e2e.test.ts",
"**/test/e2e/rpc_shell_and_fleet.e2e.test.ts",
"**/test/e2e/session.e2e.test.ts",
"**/test/e2e/session_config.e2e.test.ts",
"**/test/e2e/session_fs.e2e.test.ts",
"**/test/e2e/session_fs_sqlite.e2e.test.ts",
"**/test/e2e/session_lifecycle.e2e.test.ts",
"**/test/e2e/session_todos_changed.e2e.test.ts",
"**/test/e2e/skills.e2e.test.ts",
"**/test/e2e/streaming_fidelity.e2e.test.ts",
"**/test/e2e/subagent_hooks.e2e.test.ts",
"**/test/e2e/suspend.e2e.test.ts",
"**/test/e2e/system_message_sections.e2e.test.ts",
"**/test/e2e/system_message_transform.e2e.test.ts",
"**/test/e2e/tool_results.e2e.test.ts",
"**/test/e2e/tools.e2e.test.ts",
];
export default defineConfig({
test: {
globals: true,
environment: "node",
testTimeout: integrationTestTimeout,
hookTimeout: integrationTestTimeout,
teardownTimeout: 10000,
isolate: true, // Run each test file in isolation
pool: "forks", // Use process forking for better isolation
// Exclude our ad-hoc test files that aren't vitest-based
exclude: [
"**/node_modules/**",
"**/dist/**",
"**/*.d.ts",
"**/basic-test.ts", // Old manual test
...(isInProcessTransport ? inProcessBlockedE2E : []),
],
},
});