2026-05-26 22:11:21 +08:00
|
|
|
import { defineConfig } from "vite-plus";
|
2026-05-28 10:04:54 +08:00
|
|
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
2026-05-26 22:11:21 +08:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
2026-05-28 10:04:54 +08:00
|
|
|
plugins: [vueJsx()],
|
2026-05-26 22:11:21 +08:00
|
|
|
test: {
|
2026-05-28 10:04:54 +08:00
|
|
|
include: ["integration/pty/**/*.test.{ts,tsx}"],
|
2026-05-29 11:28:36 +08:00
|
|
|
// node-pty requires child_process.fork(), not worker_threads, so the pool
|
|
|
|
|
// MUST be "forks". Each test spawns its own isolated PTY subprocess (no
|
|
|
|
|
// shared ports/files/global state), so test files parallelize safely across
|
|
|
|
|
// forked workers — ~3x faster than serial (the PTY suite is the CI's
|
|
|
|
|
// wall-clock bottleneck). testTimeout stays generous (15s vs ~2s slowest
|
|
|
|
|
// test) to absorb CPU contention on smaller CI runners.
|
|
|
|
|
pool: "forks",
|
|
|
|
|
fileParallelism: true,
|
2026-05-29 13:34:02 +08:00
|
|
|
// Tests run concurrently by default. Each spawns its own isolated PTY
|
|
|
|
|
// subprocess (or in-process app) with no shared state, and rendering is no
|
|
|
|
|
// longer wall-clock-dependent (resize renders synchronously), so exact
|
|
|
|
|
// render-count assertions stay deterministic even under CPU contention.
|
|
|
|
|
sequence: { concurrent: true },
|
2026-05-27 01:03:40 +08:00
|
|
|
testTimeout: 15000,
|
2026-05-26 22:11:21 +08:00
|
|
|
env: { FORCE_COLOR: "3" },
|
|
|
|
|
},
|
|
|
|
|
});
|