Skip to content

Commit

Permalink
import Color from chalk rather than hard coding
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 9, 2019
1 parent 26183ce commit 0703f83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 43 deletions.
3 changes: 2 additions & 1 deletion packages/jest-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"dependencies": {
"@types/istanbul-lib-coverage": "^2.0.0",
"@types/istanbul-reports": "^1.1.1",
"@types/yargs": "^13.0.0"
"@types/yargs": "^13.0.0",
"chalk": "^3.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
44 changes: 2 additions & 42 deletions packages/jest-types/src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import {Arguments} from 'yargs';
import {ReportOptions} from 'istanbul-reports';
import chalk = require('chalk');

export type Path = string;

Expand Down Expand Up @@ -112,7 +113,7 @@ export type DisplayName =
| string
| {
name: string;
color: DisplayNameColor;
color: typeof chalk.Color;
};

export type InitialOptionsWithRootDir = InitialOptions &
Expand Down Expand Up @@ -240,47 +241,6 @@ type NotifyMode =
| 'success-change'
| 'failure-change';

/**
* Hard coding this until
* https://github.com/chalk/chalk/pull/336
* gets merged
*/
type DisplayNameColor =
| 'black'
| 'red'
| 'green'
| 'yellow'
| 'blue'
| 'magenta'
| 'cyan'
| 'white'
| 'gray'
| 'grey'
| 'blackBright'
| 'redBright'
| 'greenBright'
| 'yellowBright'
| 'blueBright'
| 'magentaBright'
| 'cyanBright'
| 'whiteBright'
| 'bgBlack'
| 'bgRed'
| 'bgGreen'
| 'bgYellow'
| 'bgBlue'
| 'bgMagenta'
| 'bgCyan'
| 'bgWhite'
| 'bgBlackBright'
| 'bgRedBright'
| 'bgGreenBright'
| 'bgYellowBright'
| 'bgBlueBright'
| 'bgMagentaBright'
| 'bgCyanBright'
| 'bgWhiteBright';

export type CoverageThresholdValue = {
branches?: number;
functions?: number;
Expand Down

0 comments on commit 0703f83

Please sign in to comment.