File tree 3 files changed +7
-13
lines changed
3 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -95,19 +95,10 @@ Feature: Rerun Formatter
95
95
When I run cucumber-js with `@rerun.txt`
96
96
Then it runs the scenario "C - passing"
97
97
98
- Scenario : empty rerun file
98
+ Scenario : empty rerun file exits without running any scenarios
99
99
Given an empty file named "@rerun.txt"
100
100
When I run cucumber-js with `@rerun.txt`
101
- Then it fails
102
- And it runs the scenarios:
103
- | NAME |
104
- | A - passing |
105
- | A - failing |
106
- | A - ambiguous |
107
- | B - passing |
108
- | B - pending |
109
- | C - passing |
110
- | C - undefined |
101
+ Then it passes
111
102
112
103
Scenario : rerun with fail fast outputs all skipped scenarios
113
104
When I run cucumber-js with `--fail-fast --format rerun:@rerun.txt`
Original file line number Diff line number Diff line change @@ -210,13 +210,13 @@ export default class ConfigurationBuilder {
210
210
if ( filename [ 0 ] === '@' ) {
211
211
const filePath = path . join ( this . cwd , arg )
212
212
const content = await fs . readFile ( filePath , 'utf8' )
213
- return _ . chain ( content ) . split ( '\n' ) . map ( _ . trim ) . compact ( ) . value ( )
213
+ return _ . chain ( content ) . split ( '\n' ) . map ( _ . trim ) . value ( )
214
214
}
215
215
return [ arg ]
216
216
} )
217
217
const featurePaths = _ . flatten ( nestedFeaturePaths )
218
218
if ( featurePaths . length > 0 ) {
219
- return featurePaths
219
+ return _ . compact ( featurePaths )
220
220
}
221
221
}
222
222
return [ 'features/**/*.feature' ]
Original file line number Diff line number Diff line change @@ -181,6 +181,9 @@ export default class Cli {
181
181
supportCodeLibrary,
182
182
} )
183
183
await emitMetaMessage ( eventBroadcaster )
184
+ if ( configuration . featurePaths . length === 0 ) {
185
+ return { shouldExitImmediately : true , success : true }
186
+ }
184
187
const gherkinMessageStream = GherkinStreams . fromPaths (
185
188
configuration . featurePaths ,
186
189
{
You can’t perform that action at this time.
0 commit comments