@@ -138,46 +138,48 @@ export async function addCucumberPreprocessorPlugin(
138
138
139
139
const node = parse ( tags ) ;
140
140
141
- const testFiles = getSpecs ( config ) . filter ( ( testFile ) => {
142
- if ( ! testFile . endsWith ( ".feature" ) ) {
143
- switch ( preprocessor . filterSpecsMixedMode ) {
144
- case "hide" :
145
- return false ;
146
- case "show" :
147
- return true ;
148
- case "empty-set" :
149
- return node . evaluate ( [ ] ) ;
150
- default :
151
- assertNever ( preprocessor . filterSpecsMixedMode ) ;
141
+ const testFiles = getSpecs ( config , "foobar" as any , true ) . filter (
142
+ ( testFile ) => {
143
+ if ( ! testFile . endsWith ( ".feature" ) ) {
144
+ switch ( preprocessor . filterSpecsMixedMode ) {
145
+ case "hide" :
146
+ return false ;
147
+ case "show" :
148
+ return true ;
149
+ case "empty-set" :
150
+ return node . evaluate ( [ ] ) ;
151
+ default :
152
+ assertNever ( preprocessor . filterSpecsMixedMode ) ;
153
+ }
152
154
}
153
- }
154
-
155
- const content = fs . readFileSync ( testFile ) . toString ( "utf-8" ) ;
156
-
157
- const options = {
158
- includeSource : false ,
159
- includeGherkinDocument : false ,
160
- includePickles : true ,
161
- newId : IdGenerator . incrementing ( ) ,
162
- } ;
163
-
164
- const envelopes = generateMessages (
165
- content ,
166
- testFile ,
167
- SourceMediaType . TEXT_X_CUCUMBER_GHERKIN_PLAIN ,
168
- options ,
169
- ) ;
170
-
171
- const pickles = envelopes
172
- . map ( ( envelope ) => envelope . pickle )
173
- . filter ( notNull ) ;
174
-
175
- return pickles . some ( ( pickle ) =>
176
- node . evaluate (
177
- pickle . tags ?. map ( ( tag ) => tag . name ) . filter ( notNull ) ?? [ ] ,
178
- ) ,
179
- ) ;
180
- } ) ;
155
+
156
+ const content = fs . readFileSync ( testFile ) . toString ( "utf-8" ) ;
157
+
158
+ const options = {
159
+ includeSource : false ,
160
+ includeGherkinDocument : false ,
161
+ includePickles : true ,
162
+ newId : IdGenerator . incrementing ( ) ,
163
+ } ;
164
+
165
+ const envelopes = generateMessages (
166
+ content ,
167
+ testFile ,
168
+ SourceMediaType . TEXT_X_CUCUMBER_GHERKIN_PLAIN ,
169
+ options ,
170
+ ) ;
171
+
172
+ const pickles = envelopes
173
+ . map ( ( envelope ) => envelope . pickle )
174
+ . filter ( notNull ) ;
175
+
176
+ return pickles . some ( ( pickle ) =>
177
+ node . evaluate (
178
+ pickle . tags ?. map ( ( tag ) => tag . name ) . filter ( notNull ) ?? [ ] ,
179
+ ) ,
180
+ ) ;
181
+ } ,
182
+ ) ;
181
183
182
184
debug ( `Resolved specs ${ inspect ( testFiles ) } ` ) ;
183
185
0 commit comments