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

Function colorize

packages/jest-watcher/src/lib/colorize.ts:10–20  ·  view source on GitHub ↗
(
  str: string,
  start: number,
  end: number,
)

Source from the content-addressed store, hash-verified

8import chalk from 'chalk';
9
10export default function colorize(
11 str: string,
12 start: number,
13 end: number,
14): string {
15 return (
16 chalk.dim(str.slice(0, start)) +
17 chalk.reset(str.slice(start, end)) +
18 chalk.dim(str.slice(end))
19 );
20}

Callers 1

formatTestNameByPatternFunction · 0.85

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected