@@ -663,33 +663,81 @@ describe('console', () => {
663663 ) ;
664664 expect ( mockLog . mock . calls ) . toEqual ( [
665665 [ 'log effect create' ] ,
666- [ 'log effect cleanup' ] ,
667- [ 'log effect create' ] ,
666+ [
667+ '%c%s' ,
668+ `color: ${ process . env . DARK_MODE_DIMMED_LOG_COLOR } ` ,
669+ 'log effect cleanup' ,
670+ ] ,
671+ [
672+ '%c%s' ,
673+ `color: ${ process . env . DARK_MODE_DIMMED_LOG_COLOR } ` ,
674+ 'log effect create' ,
675+ ] ,
668676 ] ) ;
669677 expect ( mockWarn . mock . calls ) . toEqual ( [
670678 [ 'warn effect create' ] ,
671- [ 'warn effect cleanup' ] ,
672- [ 'warn effect create' ] ,
679+ [
680+ '%c%s' ,
681+ `color: ${ process . env . DARK_MODE_DIMMED_WARNING_COLOR } ` ,
682+ 'warn effect cleanup' ,
683+ ] ,
684+ [
685+ '%c%s' ,
686+ `color: ${ process . env . DARK_MODE_DIMMED_WARNING_COLOR } ` ,
687+ 'warn effect create' ,
688+ ] ,
673689 ] ) ;
674690 expect ( mockError . mock . calls ) . toEqual ( [
675691 [ 'error effect create' ] ,
676- [ 'error effect cleanup' ] ,
677- [ 'error effect create' ] ,
692+ [
693+ '%c%s' ,
694+ `color: ${ process . env . DARK_MODE_DIMMED_ERROR_COLOR } ` ,
695+ 'error effect cleanup' ,
696+ ] ,
697+ [
698+ '%c%s' ,
699+ `color: ${ process . env . DARK_MODE_DIMMED_ERROR_COLOR } ` ,
700+ 'error effect create' ,
701+ ] ,
678702 ] ) ;
679703 expect ( mockInfo . mock . calls ) . toEqual ( [
680704 [ 'info effect create' ] ,
681- [ 'info effect cleanup' ] ,
682- [ 'info effect create' ] ,
705+ [
706+ '%c%s' ,
707+ `color: ${ process . env . DARK_MODE_DIMMED_LOG_COLOR } ` ,
708+ 'info effect cleanup' ,
709+ ] ,
710+ [
711+ '%c%s' ,
712+ `color: ${ process . env . DARK_MODE_DIMMED_LOG_COLOR } ` ,
713+ 'info effect create' ,
714+ ] ,
683715 ] ) ;
684716 expect ( mockGroup . mock . calls ) . toEqual ( [
685717 [ 'group effect create' ] ,
686- [ 'group effect cleanup' ] ,
687- [ 'group effect create' ] ,
718+ [
719+ '%c%s' ,
720+ `color: ${ process . env . DARK_MODE_DIMMED_LOG_COLOR } ` ,
721+ 'group effect cleanup' ,
722+ ] ,
723+ [
724+ '%c%s' ,
725+ `color: ${ process . env . DARK_MODE_DIMMED_LOG_COLOR } ` ,
726+ 'group effect create' ,
727+ ] ,
688728 ] ) ;
689729 expect ( mockGroupCollapsed . mock . calls ) . toEqual ( [
690730 [ 'groupCollapsed effect create' ] ,
691- [ 'groupCollapsed effect cleanup' ] ,
692- [ 'groupCollapsed effect create' ] ,
731+ [
732+ '%c%s' ,
733+ `color: ${ process . env . DARK_MODE_DIMMED_LOG_COLOR } ` ,
734+ 'groupCollapsed effect cleanup' ,
735+ ] ,
736+ [
737+ '%c%s' ,
738+ `color: ${ process . env . DARK_MODE_DIMMED_LOG_COLOR } ` ,
739+ 'groupCollapsed effect create' ,
740+ ] ,
693741 ] ) ;
694742 } ) ;
695743
@@ -729,35 +777,13 @@ describe('console', () => {
729777 </ React . StrictMode > ,
730778 ) ,
731779 ) ;
732- expect ( mockLog . mock . calls ) . toEqual ( [
733- [ 'log effect create' ] ,
734- [ 'log effect cleanup' ] ,
735- [ 'log effect create' ] ,
736- ] ) ;
737- expect ( mockWarn . mock . calls ) . toEqual ( [
738- [ 'warn effect create' ] ,
739- [ 'warn effect cleanup' ] ,
740- [ 'warn effect create' ] ,
741- ] ) ;
742- expect ( mockError . mock . calls ) . toEqual ( [
743- [ 'error effect create' ] ,
744- [ 'error effect cleanup' ] ,
745- [ 'error effect create' ] ,
746- ] ) ;
747- expect ( mockInfo . mock . calls ) . toEqual ( [
748- [ 'info effect create' ] ,
749- [ 'info effect cleanup' ] ,
750- [ 'info effect create' ] ,
751- ] ) ;
752- expect ( mockGroup . mock . calls ) . toEqual ( [
753- [ 'group effect create' ] ,
754- [ 'group effect cleanup' ] ,
755- [ 'group effect create' ] ,
756- ] ) ;
780+ expect ( mockLog . mock . calls ) . toEqual ( [ [ 'log effect create' ] ] ) ;
781+ expect ( mockWarn . mock . calls ) . toEqual ( [ [ 'warn effect create' ] ] ) ;
782+ expect ( mockError . mock . calls ) . toEqual ( [ [ 'error effect create' ] ] ) ;
783+ expect ( mockInfo . mock . calls ) . toEqual ( [ [ 'info effect create' ] ] ) ;
784+ expect ( mockGroup . mock . calls ) . toEqual ( [ [ 'group effect create' ] ] ) ;
757785 expect ( mockGroupCollapsed . mock . calls ) . toEqual ( [
758786 [ 'groupCollapsed effect create' ] ,
759- [ 'groupCollapsed effect cleanup' ] ,
760- [ 'groupCollapsed effect create' ] ,
761787 ] ) ;
762788 } ) ;
763789
0 commit comments