File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ if (flavor.match(/^test/)) {
92
92
const files = globSync ( list , { ignore } ) ;
93
93
94
94
function msToHumanDuration ( ms ) {
95
+ if ( ms < 1000 ) return `${ ms } ms` ;
95
96
const seconds = Math . floor ( ms / 1000 ) ;
96
97
const minutes = Math . floor ( seconds / 60 ) ;
97
98
const hours = Math . floor ( minutes / 60 ) ;
@@ -174,17 +175,27 @@ async function run() {
174
175
175
176
const promises = files . sort ( ) . map ( async ( file ) => {
176
177
file = path . resolve ( file ) ;
178
+ const startTest = Date . now ( ) ;
177
179
try {
178
180
await runTest ( file ) ;
179
181
ok ++ ;
180
- addLog ( pc . green ( `✔ ${ file } ok` ) ) ;
182
+ addLog (
183
+ pc . green (
184
+ `✔ ${ file } ok - ${ msToHumanDuration ( Date . now ( ) - startTest ) } ` ,
185
+ ) ,
186
+ ) ;
181
187
} catch ( error ) {
182
188
failed . push ( {
183
189
file,
184
190
error : error . message ,
185
191
output : error . logOutput ,
186
192
} ) ;
187
- addLog ( pc . red ( `✖ ${ file } FAILED (in ${ target } )` ) , true ) ;
193
+ addLog (
194
+ pc . red (
195
+ `✖ ${ file } FAILED (in ${ target } ) - ${ msToHumanDuration ( Date . now ( ) - startTest ) } ` ,
196
+ ) ,
197
+ true ,
198
+ ) ;
188
199
addLog ( pc . red ( error . message ) , true ) ;
189
200
}
190
201
You can’t perform that action at this time.
0 commit comments