Skip to content

Commit 2b222f0

Browse files
authored
cli: remove deprecated retryTagFilter option (#1713)
* remove retryTagFilter camelCased option * add changelog entry
1 parent b8e83b7 commit 2b222f0

File tree

4 files changed

+3
-33
lines changed

4 files changed

+3
-33
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO
1212
### Breaking changes
1313

1414
* Drop support for Node.js 10 and 15, add support for Node.js 16
15+
* Remove deprecated `--retryTagFilter` option (the correct option is `--retry-tag-filter`)
1516

1617
### Added
1718

features/retry.feature

+1-22
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,6 @@ Feature: Retry flaky tests
1212
"""
1313
And it fails
1414

15-
@spawn
16-
Scenario: running Cucumber JS with --retryTagFilter in camel case will result in a warning
17-
Given a file named "features/a.feature" with:
18-
"""
19-
Feature:
20-
Scenario:
21-
Given a step
22-
"""
23-
Given a file named "features/step_definitions/cucumber_steps.js" with:
24-
"""
25-
const {Given} = require('@cucumber/cucumber')
26-
27-
Given(/^a step$/, function() {})
28-
"""
29-
When I run cucumber-js with `--retry 1 --retryTagFilter @flaky`
30-
Then the error output contains the text:
31-
"""
32-
the argument --retryTagFilter is deprecated and will be removed in a future release; please use --retry-tag-filter
33-
"""
34-
But it passes
35-
3615
Scenario: running Cucumber JS with negative --retry will fail
3716
When I run cucumber-js with `--retry -1`
3817
Then the error output contains the text:
@@ -590,4 +569,4 @@ Feature: Retry flaky tests
590569
Then it fails
591570
And scenario "Failing" attempt 0 step "Given a failing step" has status "failed"
592571
And scenario "Failing" attempt 1 step "Given a failing step" has status "failed"
593-
And scenario "Passing" step "Given a passing step" has status "skipped"
572+
And scenario "Passing" step "Given a passing step" has status "skipped"

src/cli/argv_parser.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const ArgvParser = {
200200
0
201201
)
202202
.option(
203-
'--retryTagFilter, --retry-tag-filter <EXPRESSION>',
203+
'--retry-tag-filter <EXPRESSION>',
204204
`only retries the features or scenarios with tags matching the expression (repeatable).
205205
This option requires '--retry' to be specified.`,
206206
ArgvParser.mergeTags,
@@ -236,14 +236,6 @@ const ArgvParser = {
236236
args: program.args,
237237
}
238238
},
239-
240-
lint(fullArgv: string[]): void {
241-
if (fullArgv.includes('--retryTagFilter')) {
242-
console.warn(
243-
'the argument --retryTagFilter is deprecated and will be removed in a future release; please use --retry-tag-filter'
244-
)
245-
}
246-
},
247239
}
248240

249241
export default ArgvParser

src/cli/configuration_builder.ts

-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ export default class ConfigurationBuilder {
5959

6060
constructor({ argv, cwd }: INewConfigurationBuilderOptions) {
6161
this.cwd = cwd
62-
63-
ArgvParser.lint(argv)
6462
const parsedArgv = ArgvParser.parse(argv)
6563
this.args = parsedArgv.args
6664
this.options = parsedArgv.options

0 commit comments

Comments
 (0)