Commit e0f45cb 1 parent 2a2c908 commit e0f45cb Copy full SHA for e0f45cb
File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
18
18
hasFailed ,
19
19
hasFailedSnapshot ,
20
20
isCI ,
21
+ isDeno ,
21
22
isNode ,
22
23
relativePath ,
23
24
toArray ,
@@ -75,7 +76,7 @@ export abstract class BaseReporter implements Reporter {
75
76
private _offUnhandledRejection ?: ( ) => void
76
77
77
78
constructor ( options : BaseOptions = { } ) {
78
- this . isTTY = options . isTTY ?? ( isNode && process . stdout ?. isTTY && ! isCI )
79
+ this . isTTY = options . isTTY ?? ( ( isNode || isDeno ) && process . stdout ?. isTTY && ! isCI )
79
80
this . registerUnhandledRejection ( )
80
81
}
81
82
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ export const isNode: boolean
3
3
&& typeof process . stdout < 'u'
4
4
&& ! process . versions ?. deno
5
5
&& ! globalThis . window
6
- export const isWindows = isNode && process . platform === 'win32'
6
+ export const isDeno : boolean
7
+ = typeof process < 'u'
8
+ && typeof process . stdout < 'u'
9
+ && process . versions ?. deno !== undefined
10
+ export const isWindows = ( isNode || isDeno ) && process . platform === 'win32'
7
11
export const isBrowser : boolean = typeof window !== 'undefined'
8
12
export { isCI , provider as stdProvider } from 'std-env'
You can’t perform that action at this time.
0 commit comments