11import createTestCafe , { ClientFunction } from 'testcafe' ;
22import * as fs from 'fs' ;
3- import * as path from 'path' ;
43import * as process from 'process' ;
54import parseArgs from 'minimist' ;
65import { globSync } from 'glob' ;
@@ -188,6 +187,7 @@ createTestCafe(TESTCAFE_CONFIG)
188187 const fixtures = globSync ( [ `./tests/${ componentFolder } /*.ts` ] ) ;
189188 const fixtureChunks = split ( fixtures , total ) ;
190189 const targetFixtureChunk = fixtureChunks [ current - 1 ] ?? [ ] ;
190+ const targetFixtureChunkSet = new Set ( targetFixtureChunk ) ;
191191
192192 /* eslint-disable no-console */
193193 console . info ( ' === test run config ===' ) ;
@@ -197,15 +197,14 @@ createTestCafe(TESTCAFE_CONFIG)
197197 console . info ( ' > fixtures: ' , targetFixtureChunk , '\n' ) ;
198198 /* eslint-enable no-console */
199199
200- const targetBaseNames = new Set (
201- targetFixtureChunk . map ( ( filePath ) => path . basename ( filePath ) ) ,
202- ) ;
203-
204200 filters . push ( (
205201 _testName : string ,
206202 _fixtureName : string ,
207203 fixturePath : string ,
208- ) => targetBaseNames . has ( path . basename ( fixturePath ) ) ) ;
204+ ) => {
205+ const testPath = fixturePath . split ( '/testcafe-devextreme/' ) [ 1 ] ;
206+ return targetFixtureChunkSet . has ( testPath ) ;
207+ } ) ;
209208 }
210209
211210 if ( testName ) {
@@ -275,6 +274,7 @@ createTestCafe(TESTCAFE_CONFIG)
275274 process . exit ( failedCount ) ;
276275 } )
277276 . catch ( ( error : Error ) => {
277+ // eslint-disable-next-line no-console
278278 console . error ( 'TestCafe execution failed:' , error ) ;
279279 if ( testCafe ) {
280280 // eslint-disable-next-line @typescript-eslint/no-floating-promises
0 commit comments