Remove process dependency from log functions (#8530)
* Remove process dependency from log functions * Fix check * update changelog Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
parent
4f400767a8
commit
ac91c6aaae
2 changed files with 2 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import colors from 'picocolors'
|
|||
let alreadyShown = new Set()
|
||||
|
||||
function log(type, messages, key) {
|
||||
if (process.env.JEST_WORKER_ID !== undefined) return
|
||||
if (typeof process !== 'undefined' && process.env.JEST_WORKER_ID) return
|
||||
|
||||
if (key && alreadyShown.has(key)) return
|
||||
if (key) alreadyShown.add(key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue