File tree Expand file tree Collapse file tree 2 files changed +4
-26
lines changed Expand file tree Collapse file tree 2 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -352,30 +352,6 @@ function sortFolderTree() {
352
352
}
353
353
}
354
354
355
- function sortFolderTree ( ) {
356
- // 1. Sort the folderStructureTree
357
- folderStructureTree . sort ( ( a , b ) => {
358
- if ( a . absolutePath < b . absolutePath ) {
359
- return - 1 ;
360
- }
361
- if ( a . absolutePath > b . absolutePath ) {
362
- return 1 ;
363
- }
364
- return 0 ;
365
- } ) ;
366
-
367
- // 2. Set prefix according to the position in the directory
368
- for ( let i = 0 ; i < folderStructureTree . length ; i ++ ) {
369
- // Get the current directory path
370
- const currentDirPath = path . dirname ( folderStructureTree [ i ] . absolutePath ) ;
371
- // Check if it's the last file in the directory
372
- if ( i === folderStructureTree . length - 1 || path . dirname ( folderStructureTree [ i + 1 ] . absolutePath ) !== currentDirPath ) {
373
- // Update the prefix for the last file in the directory
374
- folderStructureTree [ i ] . line = folderStructureTree [ i ] . line . replace ( "├───" , "└───" ) ;
375
- }
376
- }
377
- }
378
-
379
355
async function getFunctionsForExport ( dirPath , ignoreFilesRewrite ) {
380
356
if ( ignoreFilesRewrite ) {
381
357
isFileToIgnore = ignoreFilesRewrite ;
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ async function createAdditionalTests(filePath, prefix) {
144
144
] . line = `${ red } ${ folderStructureTree [ fileIndex ] . line } ${ reset } ` ;
145
145
}
146
146
} catch ( e ) {
147
- if ( ! ignoreErrors . includes ( e . code ) ) errors . push ( e ) ;
147
+ if ( ! ignoreErrors . includes ( e . code ) ) errors . push ( e . stack ) ;
148
148
}
149
149
}
150
150
@@ -196,7 +196,7 @@ async function expandTestsForDirectory(args) {
196
196
checkForAPIKey ( ) ;
197
197
queriedPath = path . resolve ( pathToProcess ) ;
198
198
rootPath = process . cwd ( ) ;
199
- ( { screen , spinner , scrollableContent } = initScreenForUnitTests ( ) ) ;
199
+ console . log ( "Processing folder structure..." ) ;
200
200
201
201
const exportData = await getFunctionsForExport (
202
202
pathToProcess || rootPath ,
@@ -210,6 +210,8 @@ async function expandTestsForDirectory(args) {
210
210
( i ) => checkForTestFilePath ( i . absolutePath ) || i . isDirectory
211
211
) ;
212
212
213
+ ( { screen, spinner, scrollableContent } = initScreenForUnitTests ( ) ) ;
214
+
213
215
await traverseDirectoryTests ( queriedPath , false ) ;
214
216
215
217
screen . destroy ( ) ;
You can’t perform that action at this time.
0 commit comments