File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -103,18 +103,20 @@ testData.forEach((item) => {
103103 assert . ifError ( err ) ;
104104
105105 const actual = output . replace ( spaces , '' ) ;
106+ const scriptDomain = 'google-analytics.com' ;
106107 // Assert that the input stripped of all whitespace contains the
107108 // expected list
108109 assert ( actual . includes ( expected ) ) ;
109110
110111 // Testing the insertion of Google Analytics script when
111112 // an analytics id is provided. Should not be present by default
112113 if ( includeAnalytics ) {
113- assert ( actual . includes ( 'google-analytics.com' ) ,
114- ' Google Analytics script was not present' ) ;
114+ assert ( actual . includes ( scriptDomain ) ,
115+ ` Google Analytics script was not present in " ${ actual } "` ) ;
115116 } else {
116- assert . strictEqual ( actual . includes ( 'google-analytics.com' ) , false ,
117- 'Google Analytics script was present' ) ;
117+ assert . strictEqual ( actual . includes ( scriptDomain ) , false ,
118+ 'Google Analytics script was present in ' +
119+ `"${ actual } "` ) ;
118120 }
119121 } ) ) ;
120122 } ) ) ;
You can’t perform that action at this time.
0 commit comments