diff --git a/CHANGELOG.md b/CHANGELOG.md index 81478add3..55777b60c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO * Prevent duplicate scenario execution where the same feature is targeted in multiple line expressions ([#1706](https://github.com/cucumber/cucumber-js/issues/1706)) * Fixed reports banner to point to [new docs](https://cucumber.io/docs/cucumber/environment-variables/) about environment variables +* Re-add color functions for use with custom formatters [1582](https://github.com/cucumber/cucumber-js/issues/1582) * IParameterTypeDefinition regexp fix [1702](https://github.com/cucumber/cucumber-js/issues/1702) ## [7.3.0] (2021-06-17) diff --git a/src/formatter/get_color_fns.ts b/src/formatter/get_color_fns.ts index d8ece612a..d0a9453ef 100644 --- a/src/formatter/get_color_fns.ts +++ b/src/formatter/get_color_fns.ts @@ -9,6 +9,10 @@ export interface IColorFns { forStatus: (status: TestStepResultStatus) => IColorFn location: IColorFn tag: IColorFn + diffAdded: IColorFn + diffRemoved: IColorFn + errorMessage: IColorFn + errorStack: IColorFn } export default function getColorFns(enabled: boolean): IColorFns { @@ -27,6 +31,10 @@ export default function getColorFns(enabled: boolean): IColorFns { }, location: colors.gray.bind(colors), tag: colors.cyan.bind(colors), + diffAdded: colors.green.bind(colors), + diffRemoved: colors.red.bind(colors), + errorMessage: colors.red.bind(colors), + errorStack: colors.grey.bind(colors), } } else { return { @@ -35,6 +43,10 @@ export default function getColorFns(enabled: boolean): IColorFns { }, location: (x) => x, tag: (x) => x, + diffAdded: (x) => x, + diffRemoved: (x) => x, + errorMessage: (x) => x, + errorStack: (x) => x, } } }