@@ -25,7 +25,7 @@ SOFTWARE.
2525/* eslint-disable prefer-template */
2626/* eslint-disable func-names */
2727const util = require ( 'util' )
28- const chalk = require ( 'chalk ' )
28+ const colorette = require ( 'colorette ' )
2929const shouldIgnoreConsoleError = require ( './shouldIgnoreConsoleError' )
3030
3131const patchConsoleMethod = ( methodName , unexpectedConsoleCallStacks ) => {
@@ -69,23 +69,23 @@ const flushUnexpectedConsoleCalls = (
6969 if ( unexpectedConsoleCallStacks . length > 0 ) {
7070 const messages = unexpectedConsoleCallStacks . map (
7171 ( [ stack , message ] ) =>
72- `${ chalk . red ( message ) } \n` +
72+ `${ colorette . red ( message ) } \n` +
7373 `${ stack
7474 . split ( '\n' )
75- . map ( line => chalk . gray ( line ) )
75+ . map ( line => colorette . gray ( line ) )
7676 . join ( '\n' ) } `,
7777 )
7878
7979 const message =
80- `Expected test not to call ${ chalk . bold (
80+ `Expected test not to call ${ colorette . bold (
8181 `console.${ methodName } ()` ,
8282 ) } .\n\n` +
8383 'If the warning is expected, test for it explicitly by:\n' +
84- `1. Using the ${ chalk . bold ( '.' + expectedMatcher + '()' ) } ` +
84+ `1. Using the ${ colorette . bold ( '.' + expectedMatcher + '()' ) } ` +
8585 `matcher, or...\n` +
86- `2. Mock it out using ${ chalk . bold (
86+ `2. Mock it out using ${ colorette . bold (
8787 'spyOnDev' ,
88- ) } (console, '${ methodName } ') or ${ chalk . bold (
88+ ) } (console, '${ methodName } ') or ${ colorette . bold (
8989 'spyOnProd' ,
9090 ) } (console, '${ methodName } '), and test that the warning occurs.`
9191
0 commit comments