@lynxwall/cucumber-tsflow 7.1.2 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +154 -61
- package/lib/api/convert-configuration.d.ts +7 -0
- package/lib/api/convert-configuration.js +65 -0
- package/lib/api/convert-configuration.js.map +1 -0
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +1 -0
- package/lib/api/index.js.map +1 -1
- package/lib/api/load-configuration.d.ts +3 -2
- package/lib/api/load-configuration.js +78 -18
- package/lib/api/load-configuration.js.map +1 -1
- package/lib/api/run-cucumber.d.ts +5 -1
- package/lib/api/run-cucumber.js +12 -0
- package/lib/api/run-cucumber.js.map +1 -1
- package/lib/api/wrapper.mjs +1 -0
- package/lib/bindings/binding-context.d.ts +54 -3
- package/lib/bindings/binding-context.js +80 -5
- package/lib/bindings/binding-context.js.map +1 -1
- package/lib/bindings/binding-decorator.js +85 -36
- package/lib/bindings/binding-decorator.js.map +1 -1
- package/lib/bindings/binding-registry.js +10 -0
- package/lib/bindings/binding-registry.js.map +1 -1
- package/lib/bindings/hook-decorators.js +44 -19
- package/lib/bindings/hook-decorators.js.map +1 -1
- package/lib/bindings/step-decorators.js +120 -51
- package/lib/bindings/step-decorators.js.map +1 -1
- package/lib/bindings/types.js.map +1 -1
- package/lib/cli/argv-parser.d.ts +1 -0
- package/lib/cli/argv-parser.js +2 -2
- package/lib/cli/argv-parser.js.map +1 -1
- package/lib/cli/index.js +1 -4
- package/lib/cli/index.js.map +1 -1
- package/lib/runtime/make-runtime.d.ts +3 -2
- package/lib/runtime/make-runtime.js.map +1 -1
- package/lib/runtime/message-collector.d.ts +1 -1
- package/lib/runtime/message-collector.js.map +1 -1
- package/lib/runtime/parallel/adapter.d.ts +3 -2
- package/lib/runtime/parallel/adapter.js +2 -1
- package/lib/runtime/parallel/adapter.js.map +1 -1
- package/lib/runtime/parallel/run-worker.js +3 -2
- package/lib/runtime/parallel/run-worker.js.map +1 -1
- package/lib/runtime/parallel/worker.d.ts +3 -2
- package/lib/runtime/parallel/worker.js +4 -2
- package/lib/runtime/parallel/worker.js.map +1 -1
- package/lib/runtime/test-case-runner.d.ts +2 -1
- package/lib/runtime/test-case-runner.js +8 -5
- package/lib/runtime/test-case-runner.js.map +1 -1
- package/lib/runtime/{parallel/types.d.ts → types.d.ts} +12 -1
- package/lib/runtime/types.js.map +1 -0
- package/lib/transpilers/esbuild-transpiler.d.ts +1 -1
- package/lib/transpilers/esbuild-transpiler.js.map +1 -1
- package/lib/transpilers/esbuild.js +18 -1
- package/lib/transpilers/esbuild.js.map +1 -1
- package/lib/transpilers/esm/esbuild-transpiler-cjs.js +2174 -0
- package/lib/transpilers/esm/esbuild-transpiler.mjs +19 -0
- package/lib/transpilers/esm/esbuild.mjs +141 -0
- package/lib/transpilers/esm/esmbuild-transpiler.d.ts +4 -0
- package/lib/transpilers/esm/esmbuild-transpiler.js +19 -0
- package/lib/transpilers/esm/esmbuild-transpiler.js.map +1 -0
- package/lib/transpilers/esm/esmbuild.d.ts +12 -0
- package/lib/transpilers/esm/esmbuild.js +72 -0
- package/lib/transpilers/esm/esmbuild.js.map +1 -0
- package/lib/transpilers/esm/esmnode.js +8 -0
- package/lib/transpilers/esm/esmnode.js.map +1 -0
- package/lib/transpilers/esm/esmvue.js +29 -0
- package/lib/transpilers/esm/esmvue.js.map +1 -0
- package/lib/transpilers/esm/esnode-loader.mjs +9 -0
- package/lib/transpilers/esm/esvue-loader.mjs +9 -0
- package/lib/transpilers/esm/loader-utils.mjs +278 -0
- package/lib/transpilers/esm/tsnode-esm.js +25 -0
- package/lib/transpilers/esm/tsnode-esm.js.map +1 -0
- package/lib/{esnode.js → transpilers/esm/tsnode-exp-esm.js} +8 -6
- package/lib/transpilers/esm/tsnode-exp-esm.js.map +1 -0
- package/lib/transpilers/esm/tsnode-loader.mjs +107 -0
- package/lib/transpilers/esm/tsnode-service.mjs +40 -0
- package/lib/transpilers/esm/tsvue-esm.d.ts +1 -0
- package/lib/{tsvue.js → transpilers/esm/tsvue-esm.js} +8 -5
- package/lib/transpilers/esm/tsvue-esm.js.map +1 -0
- package/lib/transpilers/esm/tsvue-exp-esm.d.ts +1 -0
- package/lib/transpilers/esm/tsvue-exp-esm.js +40 -0
- package/lib/transpilers/esm/tsvue-exp-esm.js.map +1 -0
- package/lib/transpilers/esm/vue-jsdom-setup.mjs +19 -0
- package/lib/transpilers/esm/vue-loader.mjs +113 -0
- package/lib/transpilers/esm/vue-sfc-compiler.mjs +216 -0
- package/lib/transpilers/esnode.d.ts +1 -0
- package/lib/transpilers/esnode.js +8 -0
- package/lib/transpilers/esnode.js.map +1 -0
- package/lib/transpilers/esvue.d.ts +1 -0
- package/lib/transpilers/esvue.js +29 -0
- package/lib/transpilers/esvue.js.map +1 -0
- package/lib/transpilers/tsnode-exp.d.ts +1 -0
- package/lib/transpilers/tsnode-exp.js +19 -0
- package/lib/transpilers/tsnode-exp.js.map +1 -0
- package/lib/transpilers/tsnode.d.ts +1 -0
- package/lib/{tsnode.js → transpilers/tsnode.js} +5 -2
- package/lib/transpilers/tsnode.js.map +1 -0
- package/lib/transpilers/tsvue-exp.d.ts +1 -0
- package/lib/transpilers/tsvue-exp.js +40 -0
- package/lib/transpilers/tsvue-exp.js.map +1 -0
- package/lib/transpilers/tsvue.d.ts +1 -0
- package/lib/{esvue.js → transpilers/tsvue.js} +9 -7
- package/lib/transpilers/tsvue.js.map +1 -0
- package/lib/transpilers/vue-sfc/index.js.map +1 -1
- package/lib/tsconfig.node.tsbuildinfo +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +38 -25
- package/lib/esnode.js.map +0 -1
- package/lib/esvue.js.map +0 -1
- package/lib/runtime/parallel/types.js.map +0 -1
- package/lib/tsnode.js.map +0 -1
- package/lib/tsvue.js.map +0 -1
- /package/lib/runtime/{parallel/types.js → types.js} +0 -0
- /package/lib/{esnode.d.ts → transpilers/esm/esmnode.d.ts} +0 -0
- /package/lib/{esvue.d.ts → transpilers/esm/esmvue.d.ts} +0 -0
- /package/lib/{tsnode.d.ts → transpilers/esm/tsnode-esm.d.ts} +0 -0
- /package/lib/{tsvue.d.ts → transpilers/esm/tsnode-exp-esm.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# cucumber-tsflow
|
|
4
4
|
|
|
5
|
-
Provides 'specflow' like bindings for
|
|
5
|
+
Provides 'specflow' like bindings for Cucumber-JS 12.2.0 in TypeScript 5.9+.
|
|
6
6
|
|
|
7
7
|
Supports Vue3 files in cucumber tests.
|
|
8
8
|
|
|
@@ -12,6 +12,25 @@ This is a detached fork of <https://github.com/timjroberts/cucumber-js-tsflow>.
|
|
|
12
12
|
|
|
13
13
|
This fork has been drastically modified from the original and will eventually be moved to a new project. In addition, the SpecFlow project has reached [end of life](https://reqnroll.net/news/2025/01/specflow-end-of-life-has-been-announced/), and this project will be rebranded. Further details will be provided in future updates. However, the new project will support the same functionality as cucumber-tsflow while providing additional tools and extensions.
|
|
14
14
|
|
|
15
|
+
## Release Updates (7.3.0)
|
|
16
|
+
|
|
17
|
+
With this release, we've finally added support for ESM Modules. For details on the new transpilers/loaders please see: [cucumber-tsflow ESM implementation](https://github.com/LynxWall/cucumber-js-tsflow/blob/master/cucumber-tsflow/src/transpilers/esm/README.md).
|
|
18
|
+
|
|
19
|
+
Along with ESM support, additional updates include:
|
|
20
|
+
|
|
21
|
+
- Cucumber-JS updated to version 12.2.0
|
|
22
|
+
- Typescript updated to version 5.9.2
|
|
23
|
+
- ts-node replaced with ts-node-maintained. For more information, please see the section titled **Node 22+ and ts-node** in the [cucumber-tsflow ESM implementation](https://github.com/LynxWall/cucumber-js-tsflow/blob/master/cucumber-tsflow/src/transpilers/esm/README.md).
|
|
24
|
+
- Other package updates.
|
|
25
|
+
|
|
26
|
+
## Release Updates (7.2.0)
|
|
27
|
+
|
|
28
|
+
With this release, support for **Experimental Decorators** was added for backwards compatibility with any code under test that is using experimental decorators.
|
|
29
|
+
|
|
30
|
+
- Cucumber-JS updated to version 11.3.0
|
|
31
|
+
- New configuration parameter named **experimentalDecorators** that can be used to enable support for older experimental decorators.
|
|
32
|
+
- Issue with using the companion [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=lynxwall.cucumber-tsflow-vscode) has been resolved.
|
|
33
|
+
|
|
15
34
|
## Release Updates (7.1.0)
|
|
16
35
|
|
|
17
36
|
With this latest release, cucumber-tsflow has been refactored to support cucumber-js version 11.2.0 along with other updates that include:
|
|
@@ -20,7 +39,6 @@ With this latest release, cucumber-tsflow has been refactored to support cucumbe
|
|
|
20
39
|
- **API support** that implements and extends the cucumber-js API.
|
|
21
40
|
- Support for Node 22 and Typescript 5.8.
|
|
22
41
|
- Switched to **official Typescript Decorators** with metadata support implemented in [Typescript 5.2](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#decorator-metadata).
|
|
23
|
-
**NOTE:** Please **remove *experimentalDecorators*** from your TypeScript configuration as it is no longer supported with the update to use official decorators, which are very different.
|
|
24
42
|
- Transpiler configuration updates to support node and Typescript changes.
|
|
25
43
|
- Added a new section to this readme that describes [Transpilers and TypeScript](#transpilers-and-typescript) in more detail.
|
|
26
44
|
|
|
@@ -37,7 +55,11 @@ This fork of cucumber-tsflow provides the following features that extend the ori
|
|
|
37
55
|
- **2** - Implemented scenarios are passing but there are pending, undefined or unknown scenario steps.
|
|
38
56
|
- **3** - One or more scenario steps have failed.
|
|
39
57
|
|
|
40
|
-
- CommonJS transpilers using either esbuild or ts-node.
|
|
58
|
+
- CommonJS transpilers using either esbuild or ts-node-maintained.
|
|
59
|
+
|
|
60
|
+
- [ESM loaders](https://github.com/LynxWall/cucumber-js-tsflow/blob/master/cucumber-tsflow/src/transpilers/esm/README.md) using either esbuild or ts-node-maintained.
|
|
61
|
+
|
|
62
|
+
- Support for both Official and Experimental Decorators in TypeScript.
|
|
41
63
|
|
|
42
64
|
- Vue3 transformer used to handle .vue files in tests.
|
|
43
65
|
|
|
@@ -69,7 +91,7 @@ This fork of cucumber-tsflow provides the following features that extend the ori
|
|
|
69
91
|
|
|
70
92
|
## Quick Start
|
|
71
93
|
|
|
72
|
-
cucumber-tsflow uses TypeScript Decorators to create
|
|
94
|
+
cucumber-tsflow uses TypeScript Decorators to create bindings for TypeScript classes and methods that allow those classes and methods to be used in your Cucumber-JS support files. As such, cucumber-tsflow has a dependency on Cucumber-JS and extends Cucumber-JS functionality. However, you run your specifications using the cucumber-tsflow command line tool.
|
|
73
95
|
|
|
74
96
|
### Install @lynxwall/cucumber-tsflow
|
|
75
97
|
|
|
@@ -95,7 +117,7 @@ yarn add --dev @lynxwall/cucumber-tsflow
|
|
|
95
117
|
|
|
96
118
|
### Create .feature files to describe your specifications
|
|
97
119
|
|
|
98
|
-
By default,
|
|
120
|
+
By default, Cucumber-JS looks for .feature files in a folder called 'features', so create that folder and then create a new file called 'my_feature.feature':
|
|
99
121
|
|
|
100
122
|
```gherkin
|
|
101
123
|
# features/my_feature.feature
|
|
@@ -111,7 +133,11 @@ Feature: Example Feature
|
|
|
111
133
|
|
|
112
134
|
### Create the Support Files to support the Feature
|
|
113
135
|
|
|
114
|
-
|
|
136
|
+
<div style="padding: 15px; border: 1px solid transparent; border-color: transparent; margin-bottom: 20px; border-radius: 4px; color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc;">
|
|
137
|
+
<strong><span style="color: #000">Note:</span></strong> Cucumber-JS refers to any files that are used to implement tests (step definitions) along with any fixtures or utilities used in your tests as <strong><span style="color: #000">Support Files</span></strong>. As a result, any time you see references to support files or support code it is referring to test code.
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
By default, Cucumber-JS looks for support files beneath the 'features' folder. You can override this on the cucumber-tsflow command line by specifying the '-r' option. However, let's work with the default and create our code in the default location. We need to write step definitions to support the three steps that we created above.
|
|
115
141
|
|
|
116
142
|
Create a new 'ArithmeticSteps.ts' file:
|
|
117
143
|
|
|
@@ -147,38 +173,64 @@ export default class ArithmeticSteps {
|
|
|
147
173
|
|
|
148
174
|
### Compiling your TypeScript Support Code
|
|
149
175
|
|
|
150
|
-
|
|
176
|
+
All support code, which includes your step definition files along with any test fixtures, utilities and references to source code are transpiled on the fly using transpilers that are included with cucumber-tsflow. This eliminates the requirement to prebuild any test code along with associated management of those builds.
|
|
151
177
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
In this quick example test state is encapsulated directly in the class. As your test suite grows larger and step definitions get shared between multiple classes, you can begin using '[Context Injection](#context-injection)' to share state between running step definitions.
|
|
178
|
+
If not using one of the [transpilers](#transpiler-and-vue3-supported) listed below you'll need to implement your own transpiler using guidance found in Cucumber-JS documentation: [Transpiling](https://github.com/cucumber/cucumber-js/blob/v12.2.0/docs/transpiling.md)
|
|
155
179
|
|
|
156
180
|
## Transpilers and TypeScript
|
|
157
181
|
|
|
158
182
|
Cucumber-tsflow provides several [transpilers](#transpiler-and-vue3-supported) that can be used in your configuration. However, you are not required to use them. If a different configuration or transpiler is needed you can copy code from one of the provided transpilers.
|
|
159
183
|
|
|
160
|
-
This section focuses on the
|
|
184
|
+
This section focuses on the configuration used to transpile your test code, and any dependencies, into JavaScript that is executed within the Cucumber-JS test runner.
|
|
161
185
|
|
|
162
186
|
### CommonJS and ESM
|
|
163
187
|
|
|
164
|
-
|
|
188
|
+
As of version 7.3.0, cucumber-tsflow supports projects written in both CommonJS & ESM.
|
|
189
|
+
|
|
190
|
+
Read more about [cucumber-tsflow ESM implementations](./cucumber-tsflow/src/transpilers/esm/README.md).
|
|
165
191
|
|
|
166
192
|
### TypeScript Configuration
|
|
167
193
|
|
|
168
|
-
|
|
194
|
+
There are two different bundlers, or transpilers, used in cucumber-tsflow: **ts-node** and **esbuild**. This section covers the typescript configuration used for each bundler. Included with cucumber-ts are six variations of these transpilers used to support different types of projects. However, there are only two variations of typescript configurations used for each bundler, one that uses official decorators and one that uses experimental decorators.
|
|
195
|
+
|
|
196
|
+
#### ts-node
|
|
197
|
+
|
|
198
|
+
The following typescript configuration is used in the ts-node transpilers configured for official decorators:
|
|
169
199
|
|
|
170
200
|
```typescript
|
|
171
201
|
compilerOptions: {
|
|
172
202
|
module: 'nodeNext',
|
|
173
203
|
target: 'es2022',
|
|
174
204
|
strict: true,
|
|
175
|
-
|
|
205
|
+
allowJs: true,
|
|
206
|
+
allowSyntheticDefaultImports: true,
|
|
176
207
|
esModuleInterop: true,
|
|
208
|
+
experimentalDecorators: false,
|
|
209
|
+
resolveJsonModule: true,
|
|
177
210
|
skipLibCheck: true,
|
|
178
211
|
lib: ['es2022', 'esnext.decorators']
|
|
179
|
-
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
This next typescript configuration is used in the ts-node transpilers configured for official decorators:
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
compilerOptions: {
|
|
219
|
+
module: 'nodeNext',
|
|
220
|
+
target: 'es2022',
|
|
221
|
+
strict: true,
|
|
222
|
+
allowJs: true,
|
|
223
|
+
allowSyntheticDefaultImports: true,
|
|
224
|
+
esModuleInterop: true,
|
|
225
|
+
experimentalDecorators: true,
|
|
226
|
+
resolveJsonModule: true,
|
|
227
|
+
skipLibCheck: true,
|
|
228
|
+
lib: ['es2022']
|
|
229
|
+
}
|
|
180
230
|
```
|
|
181
231
|
|
|
232
|
+
As you can see the only difference is the setting for experimentalDecorators and the lib imports.
|
|
233
|
+
|
|
182
234
|
When test runs are started, the settings from your local tsconfig.json are loaded first and then the settings from the transpiler will override the specific settings shown above. As a result, you should use these transpilers in projects that will support these settings.
|
|
183
235
|
|
|
184
236
|
For example, the settings from the cucumber-tsflow vue test project is shown below:
|
|
@@ -186,33 +238,34 @@ For example, the settings from the cucumber-tsflow vue test project is shown bel
|
|
|
186
238
|
```json
|
|
187
239
|
"compilerOptions": {
|
|
188
240
|
"baseUrl": ".",
|
|
241
|
+
"module": "nodeNext",
|
|
189
242
|
"target": "es2022",
|
|
190
|
-
"module": "Node18",
|
|
191
243
|
"strict": true,
|
|
192
|
-
"importHelpers": true,
|
|
193
|
-
"skipLibCheck": true,
|
|
194
|
-
"esModuleInterop": true,
|
|
195
|
-
"forceConsistentCasingInFileNames": true,
|
|
196
|
-
"useDefineForClassFields": true,
|
|
197
|
-
"inlineSourceMap": true,
|
|
198
244
|
"allowJs": true,
|
|
199
|
-
"
|
|
245
|
+
"allowSyntheticDefaultImports": true,
|
|
246
|
+
"esModuleInterop": true,
|
|
247
|
+
"resolveJsonModule": true,
|
|
248
|
+
"skipLibCheck": true,
|
|
200
249
|
"lib": ["es2022", "esnext.decorators"],
|
|
201
250
|
"typeRoots": ["../../node_modules/@types"]
|
|
202
|
-
}
|
|
251
|
+
}
|
|
203
252
|
```
|
|
204
253
|
|
|
205
|
-
These settings are similar to the default transpiler settings, which will not cause an issue.
|
|
254
|
+
These settings are similar to the default transpiler settings, which will not cause an issue.
|
|
206
255
|
|
|
207
256
|
### esbuild Transpilers
|
|
208
257
|
|
|
209
|
-
|
|
258
|
+
<div style="padding: 15px; border: 1px solid transparent; border-color: transparent; margin-bottom: 20px; border-radius: 4px; color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc;">
|
|
259
|
+
<strong><span style="color: #000">Note:</span></strong> The esbuild transpilers do not use compilerOptions from tsconfig. Instead, all of the options are configured within the esbuild module that's included with cucumber-tsflow.
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
Cucumber-tsflow provides two esbuild transpilers: one with esbuild and support for Vue using the vue-sfc transpiler, and another that only uses the esbuild transpiler. Both cucumber-tsflow transpilers use the same esbuild transpiler, which uses the following Common set of options:
|
|
210
263
|
|
|
211
264
|
```typescript
|
|
212
265
|
const commonOptions: CommonOptions = {
|
|
213
266
|
format: 'cjs',
|
|
214
267
|
logLevel: 'info',
|
|
215
|
-
target: [`
|
|
268
|
+
target: [`es2022`],
|
|
216
269
|
minify: false,
|
|
217
270
|
sourcemap: 'external'
|
|
218
271
|
};
|
|
@@ -220,6 +273,35 @@ const commonOptions: CommonOptions = {
|
|
|
220
273
|
|
|
221
274
|
As you can see, this also uses the same target as the typescript configuration. In addition, minify is set to false, which makes it easy to debug and step into code when running tests.
|
|
222
275
|
|
|
276
|
+
In order to support both official and experimental decorators the esbuild transpiler will use different configurations based on the experimentalDecorators flag in the cucumber configuration.
|
|
277
|
+
|
|
278
|
+
#### Official Decorators
|
|
279
|
+
|
|
280
|
+
When using official decorators the following settings are added using the esbuild tsconfigRaw setting.
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
commonOptions.tsconfigRaw = {
|
|
284
|
+
compilerOptions: {
|
|
285
|
+
importsNotUsedAsValues: 'remove',
|
|
286
|
+
strict: true
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
#### Experimental Decorators
|
|
292
|
+
|
|
293
|
+
When using experimental decorators the experimentalDecorators setting is added to the tsconfigRaw settings. As mentioned, esbuild does not use tsconfig settings from ts-node or from a tsconfig file. As a result, this is the only option available to turn on experimental decorators when using esbuild.
|
|
294
|
+
|
|
295
|
+
```typescript
|
|
296
|
+
commonOptions.tsconfigRaw = {
|
|
297
|
+
compilerOptions: {
|
|
298
|
+
experimentalDecorators: true,
|
|
299
|
+
importsNotUsedAsValues: 'remove',
|
|
300
|
+
strict: true
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
```
|
|
304
|
+
|
|
223
305
|
As mentioned at the beginning of this section, there are several transpilers provided, which can be used with your test project. The [transpilers](#transpiler-and-vue3-supported) section below provides information on how to configure your project to use one of these transpilers.
|
|
224
306
|
|
|
225
307
|
## Cucumber-tsflow Test Runner
|
|
@@ -229,22 +311,23 @@ As mentioned previously, with recent updates cucumber-tsflow must be used to exe
|
|
|
229
311
|
The following example demonstrates executing cucumber-tsflow from the command line to execute tests:
|
|
230
312
|
|
|
231
313
|
```bash
|
|
232
|
-
C:\GitHub\cucumber-js-tsflow (dev -> origin)
|
|
233
|
-
λ npx cucumber-tsflow
|
|
234
|
-
Loading configuration
|
|
314
|
+
C:\GitHub\cucumber-js-tsflow\cucumber-tsflow-specs\node (dev-0525 -> origin)
|
|
315
|
+
λ npx cucumber-tsflow -p esnode
|
|
316
|
+
Loading configuration from "cucumber.json".
|
|
317
|
+
Running Cucumber-TsFlow in Serial mode.
|
|
235
318
|
|
|
236
319
|
beforeAll was called
|
|
237
|
-
|
|
320
|
+
......................@basic after hook is called.
|
|
238
321
|
.......@basic after hook is called.
|
|
239
322
|
.......@basic after hook is called.
|
|
240
|
-
|
|
323
|
+
.......................................@tags1 after hook is called.
|
|
241
324
|
......@tagging afterTag method is called
|
|
242
|
-
|
|
243
|
-
|
|
325
|
+
.afterAll was called
|
|
326
|
+
|
|
244
327
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
0m00.
|
|
328
|
+
15 scenarios (15 passed)
|
|
329
|
+
44 steps (44 passed)
|
|
330
|
+
0m00.072s (executing steps: 0m00.013s)
|
|
248
331
|
```
|
|
249
332
|
|
|
250
333
|
To recap, cucumber-tsflow extends cucumber-js, which means that all options and features provided by cucumber-js are supported with cucumber-tsflow. In other words, when executing tests using cucumber-tsflow the underlying cucumber API is actually used to run the tests.
|
|
@@ -255,7 +338,7 @@ You can also add a script to package.json to execute the tests as shown below:
|
|
|
255
338
|
|
|
256
339
|
```json
|
|
257
340
|
"scripts": {
|
|
258
|
-
"test": "cucumber-tsflow -p
|
|
341
|
+
"test": "cucumber-tsflow -p esnode"
|
|
259
342
|
}
|
|
260
343
|
```
|
|
261
344
|
|
|
@@ -313,36 +396,46 @@ echo $?
|
|
|
313
396
|
|
|
314
397
|
## New Configuration options
|
|
315
398
|
|
|
316
|
-
As mentioned, when using cucumber-tsflow to execute tests all of the configuration options documented here are supported: <https://github.com/cucumber/cucumber-js/blob/
|
|
399
|
+
As mentioned, when using cucumber-tsflow to execute tests all of the configuration options documented here are supported: <https://github.com/cucumber/cucumber-js/blob/v12.2.0/docs/configuration.md>
|
|
317
400
|
|
|
318
401
|
In addition to cucumber configuration options the following two options have been added:
|
|
319
402
|
|
|
320
|
-
| Name
|
|
321
|
-
|
|
|
322
|
-
| `transpiler`
|
|
323
|
-
| `debugFile`
|
|
324
|
-
| `enableVueStyle`
|
|
403
|
+
| Name | Type | Repeatable | CLI Option | Description | Default |
|
|
404
|
+
| ------------------------ | --------- | ---------- | --------------------------- | ------------------------------------------------------------ | ------- |
|
|
405
|
+
| `transpiler` | `string` | No | `--transpiler` | Name of the transpiler to use: es-vue, ts-vue, es-node, ts-node, es-vue-esm, es-node-esm, ts-vue-esm, ts-node-esm | none |
|
|
406
|
+
| `debugFile` | `string` | No | `--debug-file` | Path to a file with steps for debugging | |
|
|
407
|
+
| `enableVueStyle` | `boolean` | No | `--enable-vue-style` | Enable Vue `<style>` block when compiling Vue SFC. | false |
|
|
408
|
+
| `experimentalDecorators` | `boolean` | No | `--experimental-decorators` | Enable TypeScript Experimental Decorators. | false |
|
|
325
409
|
|
|
326
410
|
### Transpiler and Vue3 supported
|
|
327
411
|
|
|
328
|
-
Using TypeScript with cucumber-js requires setting tsconfig.json parameters as described here: [cucumber-js Transpiling](https://github.com/cucumber/cucumber-js/blob/
|
|
412
|
+
Using TypeScript with cucumber-js requires setting tsconfig.json parameters as described here: [cucumber-js Transpiling](https://github.com/cucumber/cucumber-js/blob/v12.2.0/docs/transpiling.md). In addition, there is no support for transpiling Vue files with cucumber-js.
|
|
329
413
|
|
|
330
414
|
As a result, cucumber-tsflow adds several configurations for transpiling TypeScript code using the recommended configuration. In addition, support has been added to transform .vue files during test execution allowing you to test Vue SFC components using cucumber.
|
|
331
415
|
|
|
332
|
-
|
|
416
|
+
By default, the `<style>` block in Vue SFC components will not be loaded when .vue files are transformed. However, that behavior can be overridden when testing compiled Vue components from a library using the `enableVueStyle` configuration setting.
|
|
333
417
|
|
|
334
|
-
|
|
418
|
+
Cucumber-TsFlow provides the following transpilers:
|
|
335
419
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
420
|
+
| Name | Transpiler/ Loader | Bundler | Description |
|
|
421
|
+
| --------------- | -------------------- | ------- | ------------------------------------------------------------ |
|
|
422
|
+
| **es‑vue** | esvue | esbuild | Uses esbuild to transpile TypeScript code and adds a hook for .vue files, which transforms Vue SFC components into common-JS. |
|
|
423
|
+
| **es‑node** | esnode | esbuild | Uses esbuild to transpile TypeScript code for node test execution. Output is common-JS. |
|
|
424
|
+
| **es‑vue‑esm** | esvue‑loader | esbuild | Uses esbuild to transpile TypeScript code and adds a hook for .vue files, which transforms Vue SFC components into ESM. |
|
|
425
|
+
| **es‑node‑esm** | esnode‑loader | esbuild | Uses esbuild to transpile TypeScript code for node test execution. Output is ESM. |
|
|
426
|
+
| **ts‑vue** | tsvue or tsvue‑exp | ts‑node | Uses ts-node to transpile TypeScript code and adds a hook for .vue files, which transforms Vue SFC components into common-JS. |
|
|
427
|
+
| **ts‑node** | tsnode or tsnode‑exp | ts‑node | Uses ts-node to transpile TypeScript code for node test execution. Output is common-JS. |
|
|
428
|
+
| **ts‑vue‑esm** | vue‑loader | ts-node | Uses ts-node to transpile TypeScript code and adds a hook for .vue files, which transforms Vue SFC components into ESM. |
|
|
429
|
+
| **ts‑node‑esm** | tsnode‑loader | ts-node | Uses ts-node to transpile TypeScript code for node test execution. Output is ESM. |
|
|
342
430
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
431
|
+
In the table above:
|
|
432
|
+
|
|
433
|
+
- **Name** - The name that would be used in cucumber.json configuration.
|
|
434
|
+
- **Transpiler/Loader** - The actual transpiler or loader (esm), that is loaded based on configuration.
|
|
435
|
+
- **NOTE**: When experimental decorators are enabled a transpiler with -exp appended to the name is loaded. For ESM builds loaders are used that use the configuration setting to determine support for experimental decorators.
|
|
436
|
+
- **Bundler** - Main bundler used. ts-node (ts-node-maintained) or esbuild.
|
|
437
|
+
|
|
438
|
+
**NOTE:** When using Vue transpilers **jsdom** is also loaded globally to support loading and testing Vue SFC components.
|
|
346
439
|
|
|
347
440
|
##### Using the transpiler configuration option
|
|
348
441
|
|
|
@@ -351,7 +444,7 @@ When configuring cucumber to execute tests you can specify which transpiler to u
|
|
|
351
444
|
```json
|
|
352
445
|
{
|
|
353
446
|
"default": {
|
|
354
|
-
"transpiler": "
|
|
447
|
+
"transpiler": "es-vue"
|
|
355
448
|
}
|
|
356
449
|
}
|
|
357
450
|
```
|
|
@@ -513,7 +606,7 @@ public givenAValueBasedSearch(searchValue: string): void {
|
|
|
513
606
|
}
|
|
514
607
|
```
|
|
515
608
|
|
|
516
|
-
**Note**: Tags added to steps work the same as "Tagged Hooks" documented here: <https://github.com/cucumber/cucumber-js/blob/
|
|
609
|
+
**Note**: Tags added to steps work the same as "Tagged Hooks" documented here: <https://github.com/cucumber/cucumber-js/blob/v12.2.0/docs/support_files/hooks.md>
|
|
517
610
|
|
|
518
611
|
## Hooks
|
|
519
612
|
|
|
@@ -589,7 +682,7 @@ public givenAValueBasedSearch(searchValue: string): void {
|
|
|
589
682
|
|
|
590
683
|
tsflow currently doesn't have a way to define a global default step timeout,
|
|
591
684
|
|
|
592
|
-
but it can be easily done through
|
|
685
|
+
but it can be easily done through Cucumber-JS `setDefaultTimeout` function.
|
|
593
686
|
|
|
594
687
|
### Passing WrapperOptions
|
|
595
688
|
|
|
@@ -608,13 +701,13 @@ public givenAValueBasedSearch(searchValue: string): void {
|
|
|
608
701
|
|
|
609
702
|
### Using different report formatters and tsflow-snippet-syntax
|
|
610
703
|
|
|
611
|
-
Changing the formatter used for generating json along with changing the Snippet Syntax can be done through the
|
|
704
|
+
Changing the formatter used for generating json along with changing the Snippet Syntax can be done through the Cucumber-JS configuration file.
|
|
612
705
|
|
|
613
706
|
If it doesn't already exist, create a file named cucumber.json at the root of your project. This is where we can configure different options for CucumberJS.
|
|
614
707
|
|
|
615
708
|
#### Using the behave json formatter
|
|
616
709
|
|
|
617
|
-
The following example shows how to configure the behave formatter in cucumber.json. The tsflow-snippet-syntax module is configured as the default snippet syntax and does not require configuration. However, you can override the snippet syntax as documented here: <https://github.com/cucumber/cucumber-js/blob/
|
|
710
|
+
The following example shows how to configure the behave formatter in cucumber.json. The tsflow-snippet-syntax module is configured as the default snippet syntax and does not require configuration. However, you can override the snippet syntax as documented here: <https://github.com/cucumber/cucumber-js/blob/v12.2.0/docs/custom_snippet_syntaxes.md>
|
|
618
711
|
|
|
619
712
|
```typescript
|
|
620
713
|
{
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IConfiguration } from '@cucumber/cucumber/lib/configuration/index';
|
|
2
|
+
import { ILogger } from '@cucumber/cucumber/lib/environment/index';
|
|
3
|
+
import { ITsFlowRunConfiguration } from '../runtime/types';
|
|
4
|
+
export interface IConfigurationExt extends IConfiguration {
|
|
5
|
+
experimentalDecorators: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function convertConfiguration(logger: ILogger, flatConfiguration: IConfigurationExt, env: NodeJS.ProcessEnv): Promise<ITsFlowRunConfiguration>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertConfiguration = convertConfiguration;
|
|
4
|
+
const index_1 = require("@cucumber/cucumber/lib/configuration/index");
|
|
5
|
+
async function convertConfiguration(logger, flatConfiguration, env) {
|
|
6
|
+
return {
|
|
7
|
+
sources: {
|
|
8
|
+
paths: flatConfiguration.paths,
|
|
9
|
+
defaultDialect: flatConfiguration.language,
|
|
10
|
+
names: flatConfiguration.name,
|
|
11
|
+
tagExpression: flatConfiguration.tags,
|
|
12
|
+
order: flatConfiguration.order
|
|
13
|
+
},
|
|
14
|
+
support: {
|
|
15
|
+
requireModules: flatConfiguration.requireModule,
|
|
16
|
+
requirePaths: flatConfiguration.require,
|
|
17
|
+
importPaths: flatConfiguration.import,
|
|
18
|
+
loaders: flatConfiguration.loader
|
|
19
|
+
},
|
|
20
|
+
runtime: {
|
|
21
|
+
dryRun: flatConfiguration.dryRun,
|
|
22
|
+
experimentalDecorators: flatConfiguration.experimentalDecorators,
|
|
23
|
+
failFast: flatConfiguration.failFast,
|
|
24
|
+
filterStacktraces: !flatConfiguration.backtrace,
|
|
25
|
+
parallel: flatConfiguration.parallel,
|
|
26
|
+
retry: flatConfiguration.retry,
|
|
27
|
+
retryTagFilter: flatConfiguration.retryTagFilter,
|
|
28
|
+
strict: flatConfiguration.strict,
|
|
29
|
+
worldParameters: flatConfiguration.worldParameters
|
|
30
|
+
},
|
|
31
|
+
formats: convertFormats(logger, flatConfiguration, env)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function convertFormats(logger, flatConfiguration, env) {
|
|
35
|
+
const splitFormats = flatConfiguration.format.map(item => Array.isArray(item) ? item : (0, index_1.splitFormatDescriptor)(logger, item));
|
|
36
|
+
return {
|
|
37
|
+
stdout: [...splitFormats].reverse().find(([, target]) => !target)?.[0] ?? 'progress',
|
|
38
|
+
files: splitFormats
|
|
39
|
+
.filter(([, target]) => !!target)
|
|
40
|
+
.reduce((mapped, [type, target]) => {
|
|
41
|
+
return {
|
|
42
|
+
...mapped,
|
|
43
|
+
[target]: type
|
|
44
|
+
};
|
|
45
|
+
}, {}),
|
|
46
|
+
publish: makePublishConfig(flatConfiguration, env),
|
|
47
|
+
options: flatConfiguration.formatOptions
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function makePublishConfig(flatConfiguration, env) {
|
|
51
|
+
const enabled = isPublishing(flatConfiguration, env);
|
|
52
|
+
if (!enabled) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
url: env.CUCUMBER_PUBLISH_URL,
|
|
57
|
+
token: env.CUCUMBER_PUBLISH_TOKEN
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function isPublishing(flatConfiguration, env) {
|
|
61
|
+
return (flatConfiguration.publish ||
|
|
62
|
+
(0, index_1.isTruthyString)(env.CUCUMBER_PUBLISH_ENABLED) ||
|
|
63
|
+
env.CUCUMBER_PUBLISH_TOKEN !== undefined);
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=convert-configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-configuration.js","sourceRoot":"","sources":["../../src/api/convert-configuration.ts"],"names":[],"mappings":"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","sourcesContent":["import { IConfiguration, isTruthyString, splitFormatDescriptor } from '@cucumber/cucumber/lib/configuration/index';\r\nimport { IPublishConfig } from '@cucumber/cucumber/lib/publish/index';\r\nimport { ILogger } from '@cucumber/cucumber/lib/environment/index';\r\n\r\n// imports the namespace needed for NodeJS - keeps eslint happy\r\nimport NodeJS from 'node:process';\r\nimport { ITsFlowRunConfiguration } from '../runtime/types';\r\n\r\nexport interface IConfigurationExt extends IConfiguration {\r\n\texperimentalDecorators: boolean;\r\n}\r\n\r\nexport async function convertConfiguration(\r\n\tlogger: ILogger,\r\n\tflatConfiguration: IConfigurationExt,\r\n\tenv: NodeJS.ProcessEnv\r\n): Promise<ITsFlowRunConfiguration> {\r\n\treturn {\r\n\t\tsources: {\r\n\t\t\tpaths: flatConfiguration.paths,\r\n\t\t\tdefaultDialect: flatConfiguration.language,\r\n\t\t\tnames: flatConfiguration.name,\r\n\t\t\ttagExpression: flatConfiguration.tags,\r\n\t\t\torder: flatConfiguration.order\r\n\t\t},\r\n\t\tsupport: {\r\n\t\t\trequireModules: flatConfiguration.requireModule,\r\n\t\t\trequirePaths: flatConfiguration.require,\r\n\t\t\timportPaths: flatConfiguration.import,\r\n\t\t\tloaders: flatConfiguration.loader\r\n\t\t},\r\n\t\truntime: {\r\n\t\t\tdryRun: flatConfiguration.dryRun,\r\n\t\t\texperimentalDecorators: flatConfiguration.experimentalDecorators,\r\n\t\t\tfailFast: flatConfiguration.failFast,\r\n\t\t\tfilterStacktraces: !flatConfiguration.backtrace,\r\n\t\t\tparallel: flatConfiguration.parallel,\r\n\t\t\tretry: flatConfiguration.retry,\r\n\t\t\tretryTagFilter: flatConfiguration.retryTagFilter,\r\n\t\t\tstrict: flatConfiguration.strict,\r\n\t\t\tworldParameters: flatConfiguration.worldParameters\r\n\t\t},\r\n\t\tformats: convertFormats(logger, flatConfiguration, env)\r\n\t};\r\n}\r\n\r\nfunction convertFormats(logger: ILogger, flatConfiguration: IConfiguration, env: NodeJS.ProcessEnv) {\r\n\tconst splitFormats: string[][] = flatConfiguration.format.map(item =>\r\n\t\tArray.isArray(item) ? item : splitFormatDescriptor(logger, item)\r\n\t);\r\n\treturn {\r\n\t\tstdout: [...splitFormats].reverse().find(([, target]) => !target)?.[0] ?? 'progress',\r\n\t\tfiles: splitFormats\r\n\t\t\t.filter(([, target]) => !!target)\r\n\t\t\t.reduce((mapped, [type, target]) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\t...mapped,\r\n\t\t\t\t\t[target]: type\r\n\t\t\t\t};\r\n\t\t\t}, {}),\r\n\t\tpublish: makePublishConfig(flatConfiguration, env),\r\n\t\toptions: flatConfiguration.formatOptions\r\n\t};\r\n}\r\n\r\nfunction makePublishConfig(flatConfiguration: IConfiguration, env: NodeJS.ProcessEnv): IPublishConfig | false {\r\n\tconst enabled = isPublishing(flatConfiguration, env);\r\n\tif (!enabled) {\r\n\t\treturn false;\r\n\t}\r\n\treturn {\r\n\t\turl: env.CUCUMBER_PUBLISH_URL,\r\n\t\ttoken: env.CUCUMBER_PUBLISH_TOKEN\r\n\t};\r\n}\r\n\r\nfunction isPublishing(flatConfiguration: IConfiguration, env: NodeJS.ProcessEnv): boolean {\r\n\treturn (\r\n\t\tflatConfiguration.publish ||\r\n\t\tisTruthyString(env.CUCUMBER_PUBLISH_ENABLED) ||\r\n\t\tenv.CUCUMBER_PUBLISH_TOKEN !== undefined\r\n\t);\r\n}\r\n"]}
|
package/lib/api/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { IConfiguration } from '@cucumber/cucumber/lib/configuration/index';
|
|
|
10
10
|
export { IRunEnvironment } from '@cucumber/cucumber/lib/environment/index';
|
|
11
11
|
export { IPickleOrder } from '@cucumber/cucumber/lib/filter/index';
|
|
12
12
|
export { IPublishConfig } from '@cucumber/cucumber/lib/publish/index';
|
|
13
|
+
export * from './convert-configuration';
|
|
13
14
|
export * from './load-configuration';
|
|
14
15
|
export * from '@cucumber/cucumber/lib/api/load_sources';
|
|
15
16
|
export * from './load-support';
|
package/lib/api/index.js
CHANGED
|
@@ -22,6 +22,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
22
22
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
__exportStar(require("./convert-configuration"), exports);
|
|
25
26
|
__exportStar(require("./load-configuration"), exports);
|
|
26
27
|
__exportStar(require("@cucumber/cucumber/lib/api/load_sources"), exports);
|
|
27
28
|
__exportStar(require("./load-support"), exports);
|
package/lib/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAMH,uDAAqC;AACrC,0EAAwD;AACxD,iDAA+B;AAC/B,iDAA+B;AAC/B,mEAAiD","sourcesContent":["/**\r\n * JavaScript API for running and extending Cucumber\r\n *\r\n * @packageDocumentation\r\n * @module api\r\n * @remarks\r\n * These docs cover the API used for running Cucumber-tsflow programmatically. The entry point is `@lynxwall/cucumber-tsflow/api`.\r\n */\r\n\r\nexport { IConfiguration } from '@cucumber/cucumber/lib/configuration/index';\r\nexport { IRunEnvironment } from '@cucumber/cucumber/lib/environment/index';\r\nexport { IPickleOrder } from '@cucumber/cucumber/lib/filter/index';\r\nexport { IPublishConfig } from '@cucumber/cucumber/lib/publish/index';\r\nexport * from './load-configuration';\r\nexport * from '@cucumber/cucumber/lib/api/load_sources';\r\nexport * from './load-support';\r\nexport * from './run-cucumber';\r\nexport * from '@cucumber/cucumber/lib/api/types';\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAMH,0DAAwC;AACxC,uDAAqC;AACrC,0EAAwD;AACxD,iDAA+B;AAC/B,iDAA+B;AAC/B,mEAAiD","sourcesContent":["/**\r\n * JavaScript API for running and extending Cucumber\r\n *\r\n * @packageDocumentation\r\n * @module api\r\n * @remarks\r\n * These docs cover the API used for running Cucumber-tsflow programmatically. The entry point is `@lynxwall/cucumber-tsflow/api`.\r\n */\r\n\r\nexport { IConfiguration } from '@cucumber/cucumber/lib/configuration/index';\r\nexport { IRunEnvironment } from '@cucumber/cucumber/lib/environment/index';\r\nexport { IPickleOrder } from '@cucumber/cucumber/lib/filter/index';\r\nexport { IPublishConfig } from '@cucumber/cucumber/lib/publish/index';\r\nexport * from './convert-configuration';\r\nexport * from './load-configuration';\r\nexport * from '@cucumber/cucumber/lib/api/load_sources';\r\nexport * from './load-support';\r\nexport * from './run-cucumber';\r\nexport * from '@cucumber/cucumber/lib/api/types';\r\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ILoadConfigurationOptions
|
|
1
|
+
import { ILoadConfigurationOptions } from '@cucumber/cucumber/lib/api/types';
|
|
2
2
|
import { IRunEnvironment } from '@cucumber/cucumber/lib/environment/index';
|
|
3
3
|
import { ITsflowConfiguration } from '../cli/argv-parser';
|
|
4
|
+
import { ITsFlowRunConfiguration } from '../runtime/types';
|
|
4
5
|
export interface ITsflowResolvedConfiguration {
|
|
5
6
|
/**
|
|
6
7
|
* The final flat configuration object resolved from the configuration file/profiles plus any extra provided.
|
|
@@ -9,7 +10,7 @@ export interface ITsflowResolvedConfiguration {
|
|
|
9
10
|
/**
|
|
10
11
|
* The format that can be passed into `runCucumber`.
|
|
11
12
|
*/
|
|
12
|
-
runConfiguration:
|
|
13
|
+
runConfiguration: ITsFlowRunConfiguration;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Load user-authored configuration to be used in a test run.
|