@@ -83,15 +83,13 @@ test('jest throws an error when globalSetup does not export a function', () => {
8383test ( 'globalSetup function gets global config object and project config as parameters' , ( ) => {
8484 const setupPath = path . resolve ( e2eDir , 'setupWithConfig.js' ) ;
8585
86- const testPathPattern = 'pass' ;
87-
8886 const result = runJest ( e2eDir , [
8987 `--globalSetup=${ setupPath } ` ,
90- ` --testPathPattern=${ testPathPattern } ` ,
88+ ' --testPathPattern=pass' ,
9189 '--cache=true' ,
9290 ] ) ;
9391
94- expect ( result . stdout ) . toBe ( ` ${ testPathPattern } \ntrue` ) ;
92+ expect ( result . stdout ) . toBe ( "[ 'pass' ] \ntrue" ) ;
9593} ) ;
9694
9795test ( 'should call globalSetup function of multiple projects' , ( ) => {
@@ -140,15 +138,13 @@ test('should not call any globalSetup if there are no tests to run', () => {
140138test ( 'globalSetup works with default export' , ( ) => {
141139 const setupPath = path . resolve ( e2eDir , 'setupWithDefaultExport.js' ) ;
142140
143- const testPathPattern = 'pass' ;
144-
145141 const result = runJest ( e2eDir , [
146142 `--globalSetup=${ setupPath } ` ,
147- ` --testPathPattern=${ testPathPattern } ` ,
143+ ' --testPathPattern=pass' ,
148144 '--cache=true' ,
149145 ] ) ;
150146
151- expect ( result . stdout ) . toBe ( ` ${ testPathPattern } \ntrue` ) ;
147+ expect ( result . stdout ) . toBe ( "[ 'pass' ] \ntrue" ) ;
152148} ) ;
153149
154150test ( 'globalSetup throws with named export' , ( ) => {
0 commit comments