| 365 | } |
| 366 | |
| 367 | function printFooter(testName: string, type: 'setup' | 'initializer' | 'test', startTime: number) { |
| 368 | const capsType = type[0].toUpperCase() + type.slice(1); |
| 369 | |
| 370 | // Round to hundredth of a second. |
| 371 | const t = Math.round((Date.now() - startTime) / 10) / 100; |
| 372 | console.log( |
| 373 | styleText(['green'], `${capsType} "`) + |
| 374 | styleText(['bold', 'blue'], testName) + |
| 375 | styleText(['green'], '" took ') + |
| 376 | styleText(['bold', 'blue'], t.toFixed(2)) + |
| 377 | styleText(['green'], 's...'), |
| 378 | ); |
| 379 | console.log(''); |
| 380 | } |
| 381 | |
| 382 | // Collect the packages passed as arguments and return as {package-name => pkg-path} |
| 383 | async function findPackageTars(): Promise<{ [pkg: string]: PkgInfo }> { |