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() {
352352 }
353353}
354354
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-
379355async function getFunctionsForExport ( dirPath , ignoreFilesRewrite ) {
380356 if ( ignoreFilesRewrite ) {
381357 isFileToIgnore = ignoreFilesRewrite ;
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ async function createAdditionalTests(filePath, prefix) {
144144 ] . line = `${ red } ${ folderStructureTree [ fileIndex ] . line } ${ reset } ` ;
145145 }
146146 } catch ( e ) {
147- if ( ! ignoreErrors . includes ( e . code ) ) errors . push ( e ) ;
147+ if ( ! ignoreErrors . includes ( e . code ) ) errors . push ( e . stack ) ;
148148 }
149149}
150150
@@ -196,7 +196,7 @@ async function expandTestsForDirectory(args) {
196196 checkForAPIKey ( ) ;
197197 queriedPath = path . resolve ( pathToProcess ) ;
198198 rootPath = process . cwd ( ) ;
199- ( { screen , spinner , scrollableContent } = initScreenForUnitTests ( ) ) ;
199+ console . log ( "Processing folder structure..." ) ;
200200
201201 const exportData = await getFunctionsForExport (
202202 pathToProcess || rootPath ,
@@ -210,6 +210,8 @@ async function expandTestsForDirectory(args) {
210210 ( i ) => checkForTestFilePath ( i . absolutePath ) || i . isDirectory
211211 ) ;
212212
213+ ( { screen, spinner, scrollableContent } = initScreenForUnitTests ( ) ) ;
214+
213215 await traverseDirectoryTests ( queriedPath , false ) ;
214216
215217 screen . destroy ( ) ;
You can’t perform that action at this time.
0 commit comments