@@ -12,6 +12,7 @@ import {
1212import {
1313 CODE_PUSHUP_DOMAIN ,
1414 FOOTER_PREFIX ,
15+ NEW_LINE ,
1516 README_LINK ,
1617} from '@code-pushup/utils' ;
1718import { mockConsole , unmockConsole } from '../../../test' ;
@@ -76,7 +77,9 @@ describe('persistReport', () => {
7677
7778 it ( 'should stdout as format by default`' , async ( ) => {
7879 await persistReport ( dummyReport , dummyConfig ) ;
79- expect ( logs . join ( '\n' ) ) . toContain ( `${ FOOTER_PREFIX } ${ CODE_PUSHUP_DOMAIN } ` ) ;
80+ expect ( logs . join ( NEW_LINE ) ) . toContain (
81+ `${ FOOTER_PREFIX } ${ CODE_PUSHUP_DOMAIN } ` ,
82+ ) ;
8083
8184 expect ( ( ) => readReport ( 'json' ) ) . not . toThrow ( ) ;
8285 expect ( ( ) => readReport ( 'md' ) ) . toThrow ( 'no such file or directory' ) ;
@@ -89,7 +92,9 @@ describe('persistReport', () => {
8992 ...dummyConfig ,
9093 persist,
9194 } ) ;
92- expect ( logs . join ( '\n' ) ) . toContain ( `${ FOOTER_PREFIX } ${ CODE_PUSHUP_DOMAIN } ` ) ;
95+ expect ( logs . join ( NEW_LINE ) ) . toContain (
96+ `${ FOOTER_PREFIX } ${ CODE_PUSHUP_DOMAIN } ` ,
97+ ) ;
9398
9499 expect ( ( ) => readReport ( 'json' ) ) . not . toThrow ( 'no such file or directory' ) ;
95100 expect ( ( ) => readReport ( 'md' ) ) . toThrow ( 'no such file or directory' ) ;
@@ -143,7 +148,9 @@ describe('persistReport', () => {
143148 `${ FOOTER_PREFIX } [Code PushUp](${ README_LINK } )` ,
144149 ) ;
145150
146- expect ( logs . join ( '\n' ) ) . toContain ( `${ FOOTER_PREFIX } ${ CODE_PUSHUP_DOMAIN } ` ) ;
151+ expect ( logs . join ( NEW_LINE ) ) . toContain (
152+ `${ FOOTER_PREFIX } ${ CODE_PUSHUP_DOMAIN } ` ,
153+ ) ;
147154 } ) ;
148155
149156 it ( 'should persist some formats`' , async ( ) => {
@@ -162,7 +169,9 @@ describe('persistReport', () => {
162169 `${ FOOTER_PREFIX } [Code PushUp](${ README_LINK } )` ,
163170 ) ;
164171
165- expect ( logs . join ( '\n' ) ) . toMatch ( `${ FOOTER_PREFIX } ${ CODE_PUSHUP_DOMAIN } ` ) ;
172+ expect ( logs . join ( NEW_LINE ) ) . toMatch (
173+ `${ FOOTER_PREFIX } ${ CODE_PUSHUP_DOMAIN } ` ,
174+ ) ;
166175 } ) ;
167176
168177 // @TODO : should throw PersistDirError
0 commit comments