@@ -8,15 +8,15 @@ const {run} = require('../bin/cli');
88const  { parseFile,  stringify,  writeFile}  =  require ( '../openapi-format' ) ; 
99
1010// SELECTIVE TESTING DEBUG 
11- const  localTesting  =  false ; 
11+ const  localTesting  =  true ; 
1212const  destroyOutput  =  false ; 
1313
1414// Load tests 
1515const  tests  =  ! localTesting 
1616  ? fs . readdirSync ( __dirname ) . filter ( file  =>  { 
17-        return  fs . statSync ( path . join ( __dirname ,  file ) ) . isDirectory ( )  &&  ! file . startsWith ( '_' ) ; 
18-      } ) 
19-   : [ 'overlay-preserve-required ' ] ; 
17+     return  fs . statSync ( path . join ( __dirname ,  file ) ) . isDirectory ( )  &&  ! file . startsWith ( '_' ) ; 
18+   } ) 
19+   : [ 'yaml-filter-unused-components-path ' ] ; 
2020
2121describe ( 'openapi-format tests' ,  ( )  =>  { 
2222  let  consoleLogSpy ,  consoleWarnSpy ; 
@@ -34,6 +34,8 @@ describe('openapi-format tests', () => {
3434  tests . forEach ( test  =>  { 
3535    describe ( test ,  ( )  =>  { 
3636      it ( 'should match expected output' ,  async  ( )  =>  { 
37+         const  start  =  process . hrtime ( ) ; 
38+ 
3739        let  options  =  { } ; 
3840        let  configFileOptions  =  { } ; 
3941        let  inputFilename  =  null ; 
@@ -133,8 +135,14 @@ describe('openapi-format tests', () => {
133135          console . error ( 'error' ,  error ) ; 
134136        } 
135137
136-         // Assert results with output 
137-         expect ( result ) . toStrictEqual ( snap ) ; 
138+         try  { 
139+           // Assert results with output 
140+           expect ( result ) . toStrictEqual ( snap ) ; 
141+         }  finally  { 
142+           const  [ sec ,  nano ]  =  process . hrtime ( start ) ; 
143+           const  ms  =  ( sec  *  1e3  +  nano  /  1e6 ) . toFixed ( 2 ) ; 
144+           process . stderr . write ( `Test "${ test } ${ ms }  ) ; 
145+         } 
138146      } ) ; 
139147    } ) ; 
140148  } ) ; 
0 commit comments