Skip to content

Commit 934fa76

Browse files
Merge branch 'main' into cr-remove-couroutine
# Conflicts: # CHANGELOG.md
2 parents 75105f2 + 59ed86b commit 934fa76

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ See the [migration guide](./docs/migration.md) for details of how to migrate fro
2929

3030
* Prevent duplicate scenario execution where the same feature is targeted in multiple line expressions ([#1706](https://github.com/cucumber/cucumber-js/issues/1706))
3131
* Fixed reports banner to point to [new docs](https://cucumber.io/docs/cucumber/environment-variables/) about environment variables
32+
* Re-add color functions for use with custom formatters [1582](https://github.com/cucumber/cucumber-js/issues/1582)
33+
* IParameterTypeDefinition regexp fix [1702](https://github.com/cucumber/cucumber-js/issues/1702)
3234

3335
## [7.3.0] (2021-06-17)
3436

CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Before anything else, thank you. Thank you for taking some of your precious time
55
## Setup
66

77
* install [Node.Js](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/)
8-
* `yarn install`
8+
* `yarn install` - Install dependencies
9+
* `yarn test` - Compile typescript and run the tests
910

1011
## Tests
1112

src/formatter/get_color_fns.ts

+12
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export interface IColorFns {
99
forStatus: (status: TestStepResultStatus) => IColorFn
1010
location: IColorFn
1111
tag: IColorFn
12+
diffAdded: IColorFn
13+
diffRemoved: IColorFn
14+
errorMessage: IColorFn
15+
errorStack: IColorFn
1216
}
1317

1418
export default function getColorFns(enabled: boolean): IColorFns {
@@ -27,6 +31,10 @@ export default function getColorFns(enabled: boolean): IColorFns {
2731
},
2832
location: colors.gray.bind(colors),
2933
tag: colors.cyan.bind(colors),
34+
diffAdded: colors.green.bind(colors),
35+
diffRemoved: colors.red.bind(colors),
36+
errorMessage: colors.red.bind(colors),
37+
errorStack: colors.grey.bind(colors),
3038
}
3139
} else {
3240
return {
@@ -35,6 +43,10 @@ export default function getColorFns(enabled: boolean): IColorFns {
3543
},
3644
location: (x) => x,
3745
tag: (x) => x,
46+
diffAdded: (x) => x,
47+
diffRemoved: (x) => x,
48+
errorMessage: (x) => x,
49+
errorStack: (x) => x,
3850
}
3951
}
4052
}

src/support_code_library_builder/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export interface IDefineTestRunHookOptions {
5858

5959
export interface IParameterTypeDefinition<T> {
6060
name: string
61-
regexp: RegExp
61+
regexp: readonly RegExp[] | readonly string[] | RegExp | string
6262
transformer: (...match: string[]) => T
6363
useForSnippets?: boolean
6464
preferForRegexpMatch?: boolean

0 commit comments

Comments
 (0)