(config: Config.ProjectConfig)
| 9 | import type {Config} from '@jest/types'; |
| 10 | |
| 11 | export 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 | } |
no outgoing calls
no test coverage detected