Skip to content

Commit

Permalink
bringing back v6/5 props (#1732)
Browse files Browse the repository at this point in the history
* bringing back v6/5 props

* changelog update

* Update CHANGELOG.md

Co-authored-by: David Goss <david@davidgoss.co>

Co-authored-by: Ludek Novy <ludeknovy@fastmail.com>
Co-authored-by: David Goss <david@davidgoss.co>
  • Loading branch information
3 people committed Jul 17, 2021
1 parent 5c4aa1c commit 59ed86b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions src/formatter/get_color_fns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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,
}
}
}

0 comments on commit 59ed86b

Please sign in to comment.