@@ -2313,6 +2313,54 @@ describe('utils', () => {
2313
2313
) ;
2314
2314
glob . sync . restore ( ) ;
2315
2315
} ) ;
2316
+
2317
+ it ( 'glob search pattern should contain default cypress 10 folder when cypressTestSuiteType is CYPRESS_V10_AND_ABOVE_TYPE' , ( ) => {
2318
+ let getNumberOfSpecFilesStub = sinon . stub ( glob , 'sync' ) ;
2319
+ let bsConfig = {
2320
+ run_settings : {
2321
+ cypressProjectDir : 'cypressProjectDir' ,
2322
+ exclude : 'exclude' ,
2323
+ cypressTestSuiteType : constant . CYPRESS_V10_AND_ABOVE_TYPE
2324
+ } ,
2325
+ } ;
2326
+
2327
+ utils . getNumberOfSpecFiles ( bsConfig , { } , { } ) ;
2328
+
2329
+ sinon . assert . calledOnceWithExactly (
2330
+ getNumberOfSpecFilesStub ,
2331
+ `cypress/e2e/**/*.+(${ constant . specFileTypes . join ( '|' ) } )` ,
2332
+ {
2333
+ cwd : 'cypressProjectDir' ,
2334
+ matchBase : true ,
2335
+ ignore : 'exclude' ,
2336
+ }
2337
+ ) ;
2338
+ glob . sync . restore ( ) ;
2339
+ } ) ;
2340
+
2341
+ it ( 'glob search pattern should contain default cypress folder when cypressTestSuiteType is not CYPRESS_V10_AND_ABOVE_TYPE' , ( ) => {
2342
+ let getNumberOfSpecFilesStub = sinon . stub ( glob , 'sync' ) ;
2343
+ let bsConfig = {
2344
+ run_settings : {
2345
+ cypressProjectDir : 'cypressProjectDir' ,
2346
+ exclude : 'exclude' ,
2347
+ cypressTestSuiteType : constant . CYPRESS_V9_AND_OLDER_TYPE
2348
+ } ,
2349
+ } ;
2350
+
2351
+ utils . getNumberOfSpecFiles ( bsConfig , { } , { } ) ;
2352
+
2353
+ sinon . assert . calledOnceWithExactly (
2354
+ getNumberOfSpecFilesStub ,
2355
+ `cypress/integration/**/*.+(${ constant . specFileTypes . join ( '|' ) } )` ,
2356
+ {
2357
+ cwd : 'cypressProjectDir' ,
2358
+ matchBase : true ,
2359
+ ignore : 'exclude' ,
2360
+ }
2361
+ ) ;
2362
+ glob . sync . restore ( ) ;
2363
+ } ) ;
2316
2364
} ) ;
2317
2365
2318
2366
describe ( 'warnSpecLimit' , ( ) => {
0 commit comments