diff --git a/packages/vitest/src/node/cli.ts b/packages/vitest/src/node/cli.ts index 287ec9a7d950..c12088fe9e85 100644 --- a/packages/vitest/src/node/cli.ts +++ b/packages/vitest/src/node/cli.ts @@ -167,6 +167,11 @@ function normalizeCliOptions(argv: CliOptions): CliOptions { } async function start(mode: VitestRunMode, cliFilters: string[], options: CliOptions): Promise { + try { + process.title = 'node (vitest)' + } + catch {} + try { const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(options)) if (!ctx?.shouldKeepServer()) diff --git a/packages/vitest/src/runtime/child.ts b/packages/vitest/src/runtime/child.ts index b1b1d915b4f4..446ad4ac5d97 100644 --- a/packages/vitest/src/runtime/child.ts +++ b/packages/vitest/src/runtime/child.ts @@ -19,6 +19,11 @@ async function init(ctx: ChildContext) { process.env.VITEST_WORKER_ID = String(workerId) process.env.VITEST_POOL_ID = String(poolId) + try { + process.title = `node (vitest ${poolId})` + } + catch {} + let setCancel = (_reason: CancelReason) => {} const onCancel = new Promise((resolve) => { setCancel = resolve