Skip to content

Commit c3cac1c

Browse files
authored
fix: use isAgent check, not just TTY, for watch mode (#9841)
1 parent 228067e commit c3cac1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vitest/src/defaults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
UserConfig,
66
} from './node/types/config'
77
import os from 'node:os'
8-
import { isCI } from './utils/env'
8+
import { isAgent, isCI } from './utils/env'
99

1010
export { defaultBrowserPort } from './constants'
1111

@@ -93,7 +93,7 @@ export const configDefaults: Readonly<{
9393
}> = Object.freeze({
9494
allowOnly: !isCI,
9595
isolate: true,
96-
watch: !isCI && process.stdin.isTTY,
96+
watch: !isCI && process.stdin.isTTY && !isAgent,
9797
globals: false,
9898
environment: 'node' as const,
9999
clearMocks: false,

0 commit comments

Comments
 (0)