Skip to content

Commit f64c3ed

Browse files
committed
fix: colors on forks pool
1 parent 4e60333 commit f64c3ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/vitest/src/node/pool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Vitest } from './core'
33
import type { TestProject } from './project'
44
import type { TestSpecification } from './spec'
55
import type { BuiltinPool, Pool } from './types/pool-options'
6+
import { isatty } from 'node:tty'
67
import mm from 'micromatch'
78
import { isWindows } from '../utils/env'
89
import { createForksPool } from './pools/forks'
@@ -124,6 +125,7 @@ export function createPool(ctx: Vitest): ProcessPool {
124125
VITEST: 'true',
125126
NODE_ENV: process.env.NODE_ENV || 'test',
126127
VITEST_MODE: ctx.config.watch ? 'WATCH' : 'RUN',
128+
FORCE_TTY: isatty(1) ? 'true' : '',
127129
...process.env,
128130
...ctx.config.env,
129131
},

0 commit comments

Comments
 (0)