55 * LICENSE file in the root directory of this source tree.
66 */
77
8- import chalk = require ( 'chalk' ) ;
8+ import * as pico from 'picocolors' ;
99import type { Config } from '@jest/types' ;
1010import {
1111 type StackTraceConfig ,
@@ -34,13 +34,13 @@ export default function getConsoleOutput(
3434 let noCodeFrame = true ;
3535
3636 if ( type === 'warn' ) {
37- message = chalk . yellow ( message ) ;
38- typeMessage = chalk . yellow ( typeMessage ) ;
37+ message = pico . yellow ( message ) ;
38+ typeMessage = pico . yellow ( typeMessage ) ;
3939 noStackTrace = globalConfig ?. noStackTrace ?? false ;
4040 noCodeFrame = false ;
4141 } else if ( type === 'error' ) {
42- message = chalk . red ( message ) ;
43- typeMessage = chalk . red ( typeMessage ) ;
42+ message = pico . red ( message ) ;
43+ typeMessage = pico . red ( typeMessage ) ;
4444 noStackTrace = globalConfig ?. noStackTrace ?? false ;
4545 noCodeFrame = false ;
4646 }
@@ -53,8 +53,8 @@ export default function getConsoleOutput(
5353 const formattedStackTrace = formatStackTrace ( origin , config , options ) ;
5454
5555 return `${
56- output + TITLE_INDENT + chalk . dim ( typeMessage )
57- } \n${ message . trimEnd ( ) } \n${ chalk . dim ( formattedStackTrace . trimEnd ( ) ) } \n\n`;
56+ output + TITLE_INDENT + pico . dim ( typeMessage )
57+ } \n${ message . trimEnd ( ) } \n${ pico . dim ( formattedStackTrace . trimEnd ( ) ) } \n\n`;
5858 } , '' ) ;
5959
6060 return `${ logEntries . trimEnd ( ) } \n` ;
0 commit comments