MCPcopy Index your code
hub / github.com/angular/angular-cli / printHeader

Function printHeader

tests/e2e_runner.ts:342–365  ·  view source on GitHub ↗
(
  testName: string,
  testIndex: number,
  count: number,
  type: 'setup' | 'initializer' | 'test',
)

Source from the content-addressed store, hash-verified

340}
341
342function printHeader(
343 testName: string,
344 testIndex: number,
345 count: number,
346 type: 'setup' | 'initializer' | 'test',
347) {
348 const text = `(${testIndex + 1} of ${count})`;
349 const fullIndex = testIndex * nbShards + (shardId ?? 0) + 1;
350 const shard =
351 shardId === null || type !== 'test'
352 ? ''
353 : styleText(
354 ['yellow'],
355 ` [${shardId}:${nbShards}]` + styleText(['bold'], ` (${fullIndex}/${tests.length})`),
356 );
357 console.log(
358 styleText(['green'], `Running ${type} "`) +
359 styleText(['bold', 'blue'], testName) +
360 styleText(['green'], '" ') +
361 styleText(['bold', 'white'], text) +
362 shard +
363 styleText(['green'], '...'),
364 );
365}
366
367function printFooter(testName: string, type: 'setup' | 'initializer' | 'test', startTime: number) {
368 const capsType = type[0].toUpperCase() + type.slice(1);

Callers 1

runStepsFunction · 0.85

Calls 1

logMethod · 0.65

Tested by

no test coverage detected