MCPcopy
hub / github.com/jestjs/jest / printDisplayName

Function printDisplayName

packages/jest-reporters/src/printDisplayName.ts:11–21  ·  view source on GitHub ↗
(config: Config.ProjectConfig)

Source from the content-addressed store, hash-verified

9import type {Config} from '@jest/types';
10
11export default function printDisplayName(config: Config.ProjectConfig): string {
12 const {displayName} = config;
13 const white = chalk.reset.inverse.white;
14 if (!displayName) {
15 return '';
16 }
17
18 const {name, color} = displayName;
19 const chosenColor = chalk.reset.inverse[color] ?? white;
20 return chalk.supportsColor ? chosenColor(` ${name} `) : name;
21}

Callers 3

getResultHeaderFunction · 0.85
getMethod · 0.85
utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected